Last Updated: February 20, 2016
·
1.149K
· dm4

Vim persistent undo history

When vim is compiled with the +persistent_undo feature, add the following lines into your .vimrc to get persistent undo history.

set undodir=~/.vim/undo/
set undofile

Don't forget to make the directory if it doesn't exist!

$ mkdir ~/.vim/undo

Enjoy it! :p