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