Undo changes even after exiting file

5 Points

dmitry12 dmitry12

7 years ago

With this snippet you can open file that you just edited and do undo from previous session.

set undofile                " Save undo's after file closes
set undodir=$HOME/.vim/undo " where to save undo histories
set undolevels=1000         " How many undos
set undoreload=10000        " number of lines to save for undo