Skip to content

Commit

Permalink
Updated vimrc
Browse files Browse the repository at this point in the history
Changed to create `~/.vim/backups` directory for `persistent_undo` only once.
  • Loading branch information
ldong committed Jul 27, 2015
1 parent 0aacd27 commit e8f0f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8f0f48

Please sign in to comment.