Time travel
Alt-u and Alt-U step through the history one state at a time. When the
state you want is a long way back, there’s an easier way to get there.
Helix has two commands for time traveling through the document history:
:earlier and :later. To see the document as it was ten minutes ago, use
:earlier 10m. To get back, use :later 10m.
There are two ways to measure the trip:
- A plain number counts states —
:earlier 1is the same asAlt-u, and:later 1is the same asAlt-U. - A duration counts time —
10s,10m,2h, or1dfor seconds, minutes, hours, and days.
Work through the checklist below to time travel by a single change: delete a
line, then travel back and forward again. Once you have the hang of it, make a
few more edits, wait a short while, and try traveling with a duration — like
:earlier 10s.