Step 4 of 5

Time travel

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 1 is the same as Alt-u, and :later 1 is the same as Alt-U.
  • A duration counts time — 10s, 10m, 2h, or 1d for 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.

  1. Delete the DELETE ME line The cursor starts on it — press x to select the line, then d.
  2. Travel back in time The line is restored — type :earlier 1 and hit Enter.
  3. Travel forward again The line disappears once more — type :later 1 and hit Enter.
Delete the DELETE ME line The cursor starts on it — press x to select the line, then d.

Next: Travel back in time

Loading editor…