commit c7ab0ab9093cd92e5dcccf9b8b615108cc420adf
parent 32473f206f0d417965a95715e7dc834bf5087ae9
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 28 Feb 2019 16:22:25 +0100
Fixed vim persistent undo
Former-commit-id: 4b106bf76c197775a9a34fbfad5fbfd31f06fdad
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/vim/general.vimrc b/vim/general.vimrc
@@ -15,9 +15,11 @@ set binary
set noswapfile
" Persistent undos (useful for plugins too)
-if has('undofile')
+if has('persistent_undo')
+ let myUndoDir = expand('$HOME/.vim' . '/undo')
+ silent call mkdir(myUndoDir, 'p')
+ let &undodir = myUndoDir
set undofile
- set undodir=~/.vim/undo
endif
" Hide buffers instead of closing