aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-16 10:49:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-16 10:49:19 +1200
commit575f00d21486e0226064c4e1a18d522555257525 (patch)
treee757ce35b00ca0b518a999126038e3b6e748b5b6
parent25b513d7c932bc052d91863a8743f1a3124097d2 (diff)
downloaddotfiles-575f00d21486e0226064c4e1a18d522555257525.tar.gz
Use slightly more correct dir definitions
-rw-r--r--vim/vimrc18
1 files changed, 15 insertions, 3 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 2531327d..86ce7158 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -46,7 +46,11 @@ set backspace+=start " The start of current insertion
" Try to keep backups in one system-appropriate dir
set backup
-set backupdir^=~/.vim/cache/backup,~/vimfiles/cache/backup
+set backupdir^=~/.vim/cache/backup
+if has('win32') || has('win64')
+ set backupdir-=~/.vim/cache/backup
+ set backupdir^=~/vimfiles/cache/backup
+endif
" Add some paths not to back up
set backupskip^=/dev/shm/*
@@ -69,7 +73,11 @@ if exists('+cursorline')
endif
" Try to keep swapfiles in one system-appropriate dir
-set directory^=~/.vim/cache/swap//,~/vimfiles/cache/swap//
+set directory^=~/.vim/cache/swap//
+if has('win32') || has('win64')
+ set directory-=~/.vim/cache/swap//
+ set directory^=~/vimfiles/cache/swap//
+endif
" Use UTF-8 if we can and env LANG didn't tell us not to
if has('multi_byte') && !exists('$LANG') && &encoding ==# 'latin1'
@@ -172,7 +180,11 @@ endif
" Keep undo files, hopefully in a dedicated directory
if has('persistent_undo')
set undofile
- set undodir^=~/.vim/cache/undo//,~/vimfiles/cache/undo//
+ set undodir^=~/.vim/cache/undo//
+ if has('win32') || has('win64')
+ set undodir-=~/.vim/cache/undo//
+ set undodir^=~/vimfiles/cache/undo//
+ endif
endif
" Don't store any options or mappings in sessions