Vim time travel

It will save your life when you mess up with UNDO


Remember that time when you UNDO stuff, do some modifications, regret it, and them you are stuck because your early state is now unreachable by REDO?

Everyone has been there before. But worry no more!

Gif recorded with LICEcap. Keystrokes preview by KeyCastr.

You can travel back in time with a single command:

:earlier 3m

This will time travel 3 minutes to the past.

Now, this:

:later 5s

… will bring you back 5 seconds to the future.


If you fancy an interactive history branch, I do recommend Undotree plugin by mbbill.


Receive one weekly vim tip on your email,
subscribe to
A Tiny Piece of Vim

… and hit the recommend to bellow if you liked this tiny tip :-)

Email me when A Tiny Piece of Vim publishes stories