Sometimes I want to get back and copy some old code that I deleted and use it. For example, I'll do:
:earlier 12h
and then yank the deleted code.
To get back to where I was, I'll issue a command like:
:later 13h
with the time argument for the :later
command being longer than the time argument I supplied for the :earlier
command.
This works, but it seems like there should be a cleaner way to jump back to the latest version of the code. I can't seem to find a command to do that, though.
:Glog
in fugitive to load older revisions of the file, or:Gdiff <revision>
to view the differences in vimdiff mode. I would consider that a better practice than:earlier