Hopefully you know how to undo and redo in vim using u and Ctrl-R. But with newer versions of vim you get point in time recovery. with :earlier. Give it a shot, make some changes to a script and then try :earlier 1m. Very cool and an easy way to undo a bunch of changes.