Updated vimrc

Changed to create `~/.vim/backups` directory for `persistent_undo` only once.
This commit is contained in:
Lin Dong
2015-07-26 23:04:24 -07:00
parent 0aacd272e1
commit e8f0f4830b

2
vimrc
View File

@@ -49,7 +49,7 @@ 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') if has('persistent_undo') && !isdirectory(expand('~').'/.vim/backups')
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