Can I add something from .vimrc?
If you put the commands:
set undofile
set undodir=~/.vim/undodir
You get infinite undo in your files.Now when you go into a file, delete or add some text and close your terminal down, the next time you enter vim you can (re|un)do previous operations.
Has saved my ass more times than I care to mention over my career!