Using Vim as a time machine

If you're editing a file in Vim you can rewind time to a previous version of the file with the earlier command. You can go backwards (or forwards) in the history of a file based on a given time measurement. This can be helpful if you mess up your file and just want to rollback to a previous version.

:earlier 5m


:later 5m

Reddit had some interesting discussion on what you can do with this feature.

Note: Alternately you can use :e! to reload the file from disk if you haven't saved since your mess up.

Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
Logged IP:
To prevent spam please submit by clicking the kitten: