Skip to content

Instantly share code, notes, and snippets.

@rnaveiras
Created March 2, 2012 16:02
Show Gist options
  • Save rnaveiras/1959330 to your computer and use it in GitHub Desktop.
Save rnaveiras/1959330 to your computer and use it in GitHub Desktop.
if exists("+undofile")
" undofile - This allows you to use undos after exiting and restarting
" This, like swap and backups, uses .vim-undo first, then ~/.vim/undo
" :help undo-persistence
" This is only present in 7.3+
if isdirectory($HOME . '/.vim/undo') == 0
:silent !mkdir -p ~/.vim/undo > /dev/null 2>&1
endif
set undodir=./.vim-undo//
set undodir+=~/.vim/undo//
set undofile
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment