Prepend 'directory' with per-user folder instead of reset

On some setups ~/.cache doesn't exist. In this case, vim will always warn that
recovery is impossible when opening a file. It's better to have swap files
in the current directory than have none at all.
master
Dustin C. Hatch 2013-08-23 23:10:20 -05:00
parent 7377bb584f
commit 601a0c7c8e
1 changed files with 2 additions and 2 deletions

View File

@ -55,12 +55,12 @@ if has('win32')
" Also, Consolas is more widely available than Luxi
set guifont=Consolas:h9:cANSI
" Store swap files together in the user's temp directory
set directory=$TEMP\\\
set directory^=$TEMP\\\
elseif has('unix')
" Nice font and size (escape spaces) (GUI only)
set guifont=Luxi\ Mono\ 9
" Store swap files together in the user's cache directory
set directory=~/.cache/vim//
set directory^=~/.cache/vim//
endif
" Open all folds by default