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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user