Does anybody know how to setup vim (the text editor) in such a way to make it possible to trace back all the changes done to a file within a day? I need it for the cases when I have accidentially modified a subroutine and would like to return it to it's initial state, as it was at the start of the day.
I usually use svn to keep the most recent version of my source code in a global repository. But sometimes I need to return to the state the code was in in between of two svn commits.
To enable persistent undo create the undo directory, e.g.
~/.vim/undodir, and place the following settings into the
set undodir=~/.vim/undodir set undofile set undolevels=1000 set undoreload=10000