test presence of persistent_undo module before use it. (prevent error msg for versions<703)

This commit is contained in:
jeremyclement 2013-11-15 16:08:30 +01:00
parent d0c49ee8dd
commit d0242e117f

9
vimrc
View File

@ -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 ======================