" 20 the swap file
+let myUndoDir = expand('~/tmp/vim/undo')
+if !isdirectory(myUndoDir)
+ " Create dirs
+ call mkdir(myUndoDir, 'p')
+endif
+
" list of directories for the swap file; remove . (the current directory)
if has("win32")
- set directory=$TEMP//,c:/tmp//,c:/temp//
+ set directory=~/tmp/vim//,$TEMP//,c:/tmp//,c:/temp//
else
set directory=~/tmp/vim//,~/tmp//,/var/tmp//,/tmp//
endif
" Keep undo history across sessions by storing it in a file
if has('persistent_undo')
- let myUndoDir = expand('$HOME/tmp/vim/undo')
- " Create dirs
- call system('mkdir -p ' . myUndoDir)
let &undodir = myUndoDir
set undofile
endif