.vimrc

changeset 10
e753144057b8
parent 7
7e6e6ff35c4d
child 11
82a2d994355e
equal deleted inserted replaced
9:3253f9876ccd 10:e753144057b8
1 set nocompatible 1 set nocompatible
2
3 let on_windows=0
4 if has('win32') || has('win64')
5 " vim in cygwin has win32 = 0 and win32unix = 1
6 let on_windows=1
7 end
2 8
3 " call pathogen#infect() 9 " call pathogen#infect()
4 " call pathogen#helptags() 10 " call pathogen#helptags()
5 11
6 " Setting up Vundle - the vim plugin bundler 12 " Setting up Vundle - the vim plugin bundler
7 let has_vundle=1 13 let installed_vundle=0
8 let vundle_readme=expand('~/.vim/bundle/vundle/README.md') 14
15 if on_windows == 0
16 let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
17 else
18 let vundle_readme=expand('~/vimfiles/bundle/vundle/README.md')
19 endif
20
9 if !filereadable(vundle_readme) 21 if !filereadable(vundle_readme)
10 let has_vundle=0 22 if !executable('git')
23 echo "You probably want git installed and in PATH"
24 quit
25 endif
26
27 let installed_vundle=1
11 echo "Installing Vundle.." 28 echo "Installing Vundle.."
12 echo "" 29 echo ""
13 silent !mkdir -p ~/.vim/bundle 30 if on_windows == 0
14 silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle 31 silent !mkdir -p ~/.vim/bundle
15 endif 32 silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
16 33 else
17 set rtp+=~/.vim/bundle/vundle/ 34 "windows is weird about args and quoting
35 silent execute '!mkdir "'. $HOME .'\vimfiles\bundle"'
36 silent execute '!git clone https://github.com/gmarik/vundle "'. $HOME .'\vimfiles\bundle\vundle"'
37 endif
38 endif
39
40 if on_windows == 0
41 set rtp+=~/.vim/bundle/vundle/
42 else
43 set rtp+=~/vimfiles/bundle/vundle/
44 endif
45
18 call vundle#rc() 46 call vundle#rc()
19 Plugin 'gmarik/vundle' 47 Plugin 'gmarik/vundle'
20 48
21 Plugin 'altercation/vim-colors-solarized' 49 Plugin 'altercation/vim-colors-solarized'
22 Plugin 'bling/vim-airline' 50 Plugin 'bling/vim-airline'
31 59
32 Plugin 'danchoi/ri.vim' 60 Plugin 'danchoi/ri.vim'
33 Plugin 'tpope/vim-fugitive' 61 Plugin 'tpope/vim-fugitive'
34 Plugin 'ludovicchabant/vim-lawrencium' 62 Plugin 'ludovicchabant/vim-lawrencium'
35 63
36 if has_vundle == 0 64 if installed_vundle == 1
37 echo "Installing Plugins, please ignore key map error messages" 65 echo "Installing Plugins, please ignore key map error messages"
38 echo "" 66 echo ""
39 :PluginInstall 67 :PluginInstall
40 endif 68 endif
41 " Setting up Vundle - the vim plugin bundler end 69 " Setting up Vundle - the vim plugin bundler end
102 set sbr=»\ 130 set sbr=»\
103 131
104 set statusline=%f%m%r%h%w\ %y\ %=%l,%c\ %p%%\ %L 132 set statusline=%f%m%r%h%w\ %y\ %=%l,%c\ %p%%\ %L
105 set laststatus=2 133 set laststatus=2
106 134
107 if has("win32") || has("win16") 135 if on_windows == 1
108 let $MYVIM=$HOME.'/vimfiles' 136 let $MYVIM=$HOME.'/vimfiles'
109 137
110 if !filewritable( $MYVIM . '/var' ) 138 if !filewritable( $MYVIM . '/var' )
111 silent execute '!mkdir "'.$HOME.'\vimfiles\var"' 139 silent execute '!mkdir "'.$HOME.'\vimfiles\var"'
112 endif 140 endif
172 "let perl_fold = 1 "perl fold scanning is slow 200 "let perl_fold = 1 "perl fold scanning is slow
173 let perl_include_pod = 1 201 let perl_include_pod = 1
174 202
175 " -- Gundo 203 " -- Gundo
176 " I prefer python3 on windows if I have to use it. 204 " I prefer python3 on windows if I have to use it.
177 if has('win32') 205 if on_windows == 1
178 let g:gundo_prefer_python3=1 206 let g:gundo_prefer_python3=1
179 endif 207 endif
180 208
181 " -- Tagbar 209 " -- Tagbar
182 if has("win32") || has("win16") 210 if on_windows == 1
183 let g:tagbar_ctags_bin = 'C:\Users\mhoward\bin\ctags.exe' 211 let g:tagbar_ctags_bin = 'C:\Users\mhoward\bin\ctags.exe'
184 endif 212 endif
185 213
186 let g:tagbar_autoclose = 1 214 let g:tagbar_autoclose = 1
187 let g:tagbar_autofocus = 1 215 let g:tagbar_autofocus = 1
217 let g:airline#extensions#whitespace#enabled = 0 245 let g:airline#extensions#whitespace#enabled = 0
218 246
219 247
220 " Local stuff 248 " Local stuff
221 try 249 try
222 if has("win32") || has("win16") 250 if on_windows == 1
223 source ~/_vimrc.local 251 source ~/_vimrc.local
224 else 252 else
225 source ~/.vimrc.local 253 source ~/.vimrc.local
226 endif 254 endif
227 catch 255 catch

mercurial