From 601a0c7c8ea922636c76d5f2a8adc5735e38d8b3 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 23 Aug 2013 23:10:20 -0500 Subject: [PATCH] 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. --- plugin/00-dustin.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/00-dustin.vim b/plugin/00-dustin.vim index 63d70c8..b7ba973 100644 --- a/plugin/00-dustin.vim +++ b/plugin/00-dustin.vim @@ -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