3 set nocompatible |
3 set nocompatible |
4 |
4 |
5 " on windows and not cygwin |
5 " on windows and not cygwin |
6 let g:on_windows = (has('win32') || has('win64')) |
6 let g:on_windows = (has('win32') || has('win64')) |
7 let g:myvim = $HOME . (g:on_windows ? '/vimfiles' : '/.vim') |
7 let g:myvim = $HOME . (g:on_windows ? '/vimfiles' : '/.vim') |
|
8 let g:vimcache = $HOME . '/.cache/vim' |
8 let s:filename = expand('<sfile>') |
9 let s:filename = expand('<sfile>') |
9 |
10 |
10 " Set up Vundle and plugins {{{ |
11 " Set up Vundle and plugins {{{ |
11 call vimrc#VundleInstallAndBegin() |
12 call vimrc#VundleInstallAndBegin() |
12 |
13 |
193 |
194 |
194 " Enable enhanced % matching in ruby |
195 " Enable enhanced % matching in ruby |
195 runtime macros/matchit.vim |
196 runtime macros/matchit.vim |
196 |
197 |
197 for subdir in ['backup', 'tmp', 'undo'] |
198 for subdir in ['backup', 'tmp', 'undo'] |
198 if !filewritable(g:myvim . '/var/' . subdir) |
199 if !filewritable(g:vimcache . '/' . subdir) |
199 call mkdir(g:myvim . '/var/' . subdir, 'p', 0700) |
200 call mkdir(g:vimcache . '/' . subdir, 'p', 0700) |
200 endif |
201 endif |
201 endfor |
202 endfor |
202 |
203 |
203 set backup |
204 set backup |
204 let &backupdir = g:myvim . '/var/backup//,.' |
205 let &backupdir = g:vimcache . '/backup//,.' |
205 let &directory = g:myvim . '/var/tmp//,.' |
206 let &directory = g:vimcache . '/tmp//,.' |
206 |
207 |
207 if has('persistent_undo') |
208 if has('persistent_undo') |
208 set undofile |
209 set undofile |
209 let &undodir = g:myvim . '/var/undo//,.' |
210 let &undodir = g:vimcache . '/undo//,.' |
210 endif |
211 endif |
211 |
212 |
212 if g:on_windows |
213 if g:on_windows |
213 set guifont=DejaVu_Sans_Mono:h10:cDEFAULT |
214 set guifont=DejaVu_Sans_Mono:h10:cDEFAULT |
214 set linespace=0 |
215 set linespace=0 |