aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-14 00:10:51 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-14 00:10:51 +1200
commit059f1566c5e18b064c0a3ef16163e007941f5e8f (patch)
tree343f4ee772122aadaae2397899ac17d768618c2b
parentConsolidate 'backup' and 'backupskip' sections (diff)
downloaddotfiles-059f1566c5e18b064c0a3ef16163e007941f5e8f.tar.gz
dotfiles-059f1566c5e18b064c0a3ef16163e007941f5e8f.zip
Consolidate +persistent_undo section
-rw-r--r--vim/vimrc20
1 files changed, 7 insertions, 13 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 03892685..6a7e6425 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -370,25 +370,19 @@ set directory^=$MYVIM/cache/swap//
" directory, so that the u/:undo and CTRL-R/:redo commands will work between
" Vim invocations.
"
+" The 'undodir' option has the same structure as 'backupdir' and 'directory';
+" if we have a user runtime directory, create a sub-subdirectory within it
+" dedicated to the undo files cache. Note also the trailing double-slash as
+" a signal to Vim to use the full path of the original file in its undo file
+" cache's name.
+"
" Support for these persistent undo file caches was not released until v7.3.0,
" so we need to check for the feature's presence before we enable it.
"
if has('persistent_undo')
-
- " This has the same structure as 'backupdir' and 'directory'; if we have
- " a user runtime directory, create a sub-subdirectory within it dedicated to
- " the undo files cache. Note also the trailing double-slash as a signal to
- " Vim to use the full path of the original file in its undo file cache's
- " name.
- "
Establish $MYVIM/cache/undo
- set undodir^=$MYVIM/cache/undo//
-
- " Turn the persistent undo features on, now that we hopefully have a cache
- " directory configured to collect them.
- "
set undofile
-
+ set undodir^=$MYVIM/cache/undo//
endif
" For word completion in insert mode with CTRL-X CTRL-K, or if 'complete'