diff --git a/vimrc b/vimrc index 489daa4..196cf7c 100644 --- a/vimrc +++ b/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 ======================