16 set list listchars=tab:\ \ ,trail:ยท
25 set wildmode=list:longest,list:full
26 set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/*
31 " NERDTree configuration
32 let NERDTreeIgnore=['\.pyc$', '\.rbc$', '\~$']
33 map <Leader>n :NERDTreeToggle<CR>
36 map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
39 " Remember last location in file
41 au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
42 \| exe "normal g'\"" | endif
45 function s:setupWrapping()
51 function s:setupMarkup()
52 call s:setupWrapping()
53 map <buffer> <Leader>p :Hammer<CR>
57 au FileType make set noexpandtab
59 " Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
60 au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby
62 " md, markdown, and mk are markdown and define buffer-local preview
63 au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn} call s:setupMarkup()
65 " add json syntax highlighting
66 au BufNewFile,BufRead *.json set ft=javascript
68 au BufRead,BufNewFile *.txt call s:setupWrapping()
70 " make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
71 au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
73 " snes syntax highlighting
74 au BufNewFile,BufRead *.asm,*.s set filetype=snes"
76 " allow backspacing over everything in insert mode
77 set backspace=indent,eol,start
79 " load the plugin and indent settings for the detected filetype
80 filetype plugin indent on
83 " Opens an edit command with the path of the currently edited file filled in
84 " Normal mode: <Leader>e
85 map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
87 " Opens a tab edit command with the path of the currently edited file filled in
88 " Normal mode: <Leader>t
89 map <Leader>te :tabe <C-R>=expand("%:p:h") . "/" <CR>
91 " Unimpaired configuration
95 " Bubble multiple lines
101 let g:gist_clip_command = 'pbcopy'
103 let g:gist_clip_command = 'xclip -selection clipboard'
105 let g:gist_detect_filetype = 1
106 let g:gist_open_browser_after_post = 1
108 " Use modeline overrides
112 " Default color scheme
116 " Directories for swp files
117 set backupdir=~/.vim/.backup
118 set directory=~/.vim/.backup
120 " Turn off jslint errors by default
121 let g:JSLintHighlightErrorLine = 0
123 " MacVIM shift+arrow-keys behavior (required in .vimrc)
124 let macvim_hig_shift_movement = 1
126 " % to bounce from do to end etc.
127 runtime! macros/matchit.vim
129 " Show (partial) command in the status line
132 " Include user's local vim config
133 if filereadable(expand("~/.vimrc.local"))
134 source ~/.vimrc.local
138 nmap <F8> :TagbarToggle<CR>
139 let g:tagbar_ctags_bin="/usr/local/bin/ctags"
142 let &colorcolumn="80,150"
145 call pathogen#infect()
148 set foldmethod=syntax
153 " Fix CtrlP root folder and add some ignores
154 let g:ctrlp_working_path_mode = 0
155 let g:ctrlp_custom_ignore = '\v[\/](\.(git|hg|svn)|node_modules|DS_Store)$'
156 let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files']
159 autocmd FocusLost * :set norelativenumber
160 autocmd InsertEnter * :set norelativenumber
161 autocmd InsertLeave * :set relativenumber
162 autocmd CursorMoved * :set relativenumber
164 function! NumberToggle()
165 if(&relativenumber == 1)
172 nnoremap <C-n> :call NumberToggle()<cr>
175 let g:syntastic_javascript_checkers = ['eslint']
176 let g:syntastic_always_populate_loc_list = 1
177 let g:syntastic_check_on_open = 1
178 let g:syntastic_check_on_wq = 1
179 let g:syntastic_error_symbol = "X"
180 let g:syntastic_warning_symbol = "!"
183 highlight Keyword cterm=italic
186 set rtp+=/usr/local/opt/fzf
188 " Inserts the path of the currently edited file into a command
189 noremap <C-P> :FZF <CR>
191 " Map colors to vim colors
193 \ { 'fg': ['fg', 'Normal'],
194 \ 'bg': ['bg', 'Normal'],
195 \ 'hl': ['fg', 'Comment'],
196 \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
197 \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
198 \ 'hl+': ['fg', 'Statement'],
199 \ 'info': ['fg', 'PreProc'],
200 \ 'border': ['fg', 'Ignore'],
201 \ 'prompt': ['fg', 'Conditional'],
202 \ 'pointer': ['fg', 'Exception'],
203 \ 'marker': ['fg', 'Keyword'],
204 \ 'spinner': ['fg', 'Label'],
205 \ 'header': ['fg', 'Comment'] }