test presence of persistent_undo module before use it. (prevent error msg for versions<703)
This commit is contained in:
parent
d0c49ee8dd
commit
d0242e117f
9
vimrc
9
vimrc
@ -49,10 +49,11 @@ set nowb
|
||||
" ================ Persistent Undo ==================
|
||||
" Keep undo history across sessions, by storing in file.
|
||||
" Only works all the time.
|
||||
|
||||
silent !mkdir ~/.vim/backups > /dev/null 2>&1
|
||||
set undodir=~/.vim/backups
|
||||
set undofile
|
||||
if has('persistent_undo')
|
||||
silent !mkdir ~/.vim/backups > /dev/null 2>&1
|
||||
set undodir=~/.vim/backups
|
||||
set undofile
|
||||
endif
|
||||
|
||||
" ================ Indentation ======================
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user