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 " Without setting this, ZoomWin restores windows in a way that causes
32 " equalalways behavior to be triggered the next time CommandT is used.
33 " This is likely a bludgeon to solve some other issue, but it works
36 " NERDTree configuration
37 let NERDTreeIgnore=['\.pyc$', '\.rbc$', '\~$']
38 map <Leader>n :NERDTreeToggle<CR>
41 map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
44 " Remember last location in file
46 au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
47 \| exe "normal g'\"" | endif
50 function s:setupWrapping()
56 function s:setupMarkup()
57 call s:setupWrapping()
58 map <buffer> <Leader>p :Hammer<CR>
62 au FileType make set noexpandtab
64 " Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
65 au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby
67 " md, markdown, and mk are markdown and define buffer-local preview
68 au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn} call s:setupMarkup()
70 " add json syntax highlighting
71 au BufNewFile,BufRead *.json set ft=javascript
73 au BufRead,BufNewFile *.txt call s:setupWrapping()
75 " make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
76 au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
78 " allow backspacing over everything in insert mode
79 set backspace=indent,eol,start
81 " load the plugin and indent settings for the detected filetype
82 filetype plugin indent on
84 " Opens an edit command with the path of the currently edited file filled in
85 " Normal mode: <Leader>e
86 map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
88 " Opens a tab edit command with the path of the currently edited file filled in
89 " Normal mode: <Leader>t
90 map <Leader>te :tabe <C-R>=expand("%:p:h") . "/" <CR>
92 " Inserts the path of the currently edited file into a command
93 " Command mode: Ctrl+P
94 cmap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
96 " Unimpaired configuration
100 " Bubble multiple lines
104 " Enable syntastic syntax checking
105 let g:syntastic_enable_signs=1
106 let g:syntastic_quiet_warnings=1
110 let g:gist_clip_command = 'pbcopy'
112 let g:gist_clip_command = 'xclip -selection clipboard'
114 let g:gist_detect_filetype = 1
115 let g:gist_open_browser_after_post = 1
117 " Use modeline overrides
121 " Default color scheme
125 " Directories for swp files
126 set backupdir=~/.vim/backup
127 set directory=~/.vim/backup
129 " Turn off jslint errors by default
130 let g:JSLintHighlightErrorLine = 0
132 " MacVIM shift+arrow-keys behavior (required in .vimrc)
133 let macvim_hig_shift_movement = 1
135 " % to bounce from do to end etc.
136 runtime! macros/matchit.vim
138 " Show (partial) command in the status line
141 " Include user's local vim config
142 if filereadable(expand("~/.vimrc.local"))
143 source ~/.vimrc.local
147 nmap <F8> :TagbarToggle<CR>
153 call pathogen#infect()
156 set foldmethod=syntax