aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-25 15:08:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-25 15:32:32 +1200
commit4996972417ba1ec32df0decd591a61e796875e67 (patch)
tree2a9becbc4b8deb3f49e1b4735931ae53b94242ab
parentTolerate smart quotes in g'day (diff)
downloaddotfiles-4996972417ba1ec32df0decd591a61e796875e67.tar.gz
dotfiles-4996972417ba1ec32df0decd591a61e796875e67.zip
Adjust some conditionals a bit more
-rw-r--r--vim/vimrc19
1 files changed, 9 insertions, 10 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 3a686b39..e93bd4e3 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -14,22 +14,21 @@ set shiftwidth=4 " Indent with four spaces
" Make insert mode tab key add the same number of spaces as 'shiftwidth', use
" negative value to do this if Vim new enough to support it
-let &softtabstop =
- \ v:version > 703 || v:version == 703 && has('patch693')
- \ ? -1
- \ : &shiftwidth
+let &softtabstop = v:version > 703
+ \ || v:version == 703 && has('patch693')
+ \ ? -1 : &shiftwidth
" Restore insert mode 'backspace' limits to the stringent Vim default, if a
" system vimrc or Neovim has messed with it
set backspace=
-" Keep backup files in dedicated directory
+" 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
-if has('patch-8.1.251') " Can keep full path in filename
- set backupdir^=$MYVIM/cache/backup//
-else
- set backupdir^=$MYVIM/cache/backup
-endif
+execute 'set backupdir^='
+ \ . escape($MYVIM, '\ ')
+ \ . '/cache/backup'
+ \ . (has('patch-8.1.251') ? '//' : '')
" Add some *nix paths not to back up
if has('unix')