aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-08 19:49:09 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-08 19:49:09 +1200
commit0c5b8e9aaa9fdf88fa4135c1dd94ae2aa3dd0cb2 (patch)
tree7481d2578073ad382c3da5c5a43be0c5f03ae8e9
parentRemove 'completeopt' settings (diff)
downloaddotfiles-0c5b8e9aaa9fdf88fa4135c1dd94ae2aa3dd0cb2.tar.gz
dotfiles-0c5b8e9aaa9fdf88fa4135c1dd94ae2aa3dd0cb2.zip
Refactor 'directory' processing in vimrc
-rw-r--r--vim/vimrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 427dab21..14362f6e 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -73,8 +73,8 @@ set cpoptions+=J
" Specify where to look for a dictionary even if 'spell' isn't on
set dictionary^=/usr/share/dict/words
-" Keep swap files in dedicated directory, named with full path
-execute 'set directory^='.vimrc#EscapeSetPart($MYVIM.'/cache/swap//')
+let s:directory = $MYVIM.'/cache/swap//'
+execute 'set directory^='.vimrc#EscapeSetPart(s:directory)
call vimrc#Ensure(&directory)
" If the environment didn't set an encoding, use UTF-8, not ASCII