1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 09:15:24 +02:00

[vim] Test if the persistent undo feature is available

This commit is contained in:
Hyacinthe Cartiaux 2015-03-26 11:53:13 +01:00
parent 1a389cd68e
commit acbcef47f2

View file

@ -153,12 +153,14 @@ set backup
set backupdir=$HOME/.vim/backup//
set directory=$HOME/.vim/swap//
set undofile
set undolevels=1000 "maximum number of changes that can be undone
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
if exists("&undodir")
if has('persistent_undo')
set undofile
set undolevels=1000 "maximum number of changes that can be undone
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
if exists("&undodir")
set undodir=$HOME/.vim/undo//
endif
endif
end
set viminfo+=n$HOME/.vim/.viminfo