diff --git a/vimrc b/vimrc index 5927a8b7..27bbd79d 100644 --- a/vimrc +++ b/vimrc @@ -49,7 +49,7 @@ set nowb " ================ Persistent Undo ================== " Keep undo history across sessions, by storing in file. " 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 set undodir=~/.vim/backups set undofile