aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-08 19:47:58 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-08 19:47:58 +1200
commitdc710e6c6e90148837c5b07d747426396c4c525a (patch)
treeb8c1a7c210e741cbeb0d7ea63698b70d491ad758
parentRefactor 'runtimepath' chopping in vimrc (diff)
downloaddotfiles-dc710e6c6e90148837c5b07d747426396c4c525a.tar.gz
dotfiles-dc710e6c6e90148837c5b07d747426396c4c525a.zip
Refactor 'backupdir' processing in vimrc
-rw-r--r--vim/vimrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 8e7035b7..f8ac71fc 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -25,9 +25,9 @@ set backspace+=start " Before the start of current insertion
" Keep backup files in dedicated directory; add trailing double-slash to keep
" full path in name, if Vim is new enough to support that
set backup
-execute 'set backupdir^='.vimrc#EscapeSetPart(
- \ $MYVIM.'/cache/backup'.(vimrc#Version('8.1.251') ? '//' : '')
- \ )
+let s:backup_full_path = vimrc#Version('8.1.251')
+let s:backupdir = $MYVIM.'/cache/backup'.(s:backup_full_path ? '//' : '')
+execute 'set backupdir^='.vimrc#EscapeSetPart(s:backupdir)
call vimrc#Ensure(&backupdir)
" Add some *nix paths not to back up