From e8f0f4830b6c9c198707fbd9cf90944ad46c58b8 Mon Sep 17 00:00:00 2001 From: Lin Dong Date: Sun, 26 Jul 2015 23:04:24 -0700 Subject: [PATCH] Updated vimrc Changed to create `~/.vim/backups` directory for `persistent_undo` only once. --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 5927a8b..27bbd79 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