Step 1 of 5

Undo

Undo

Mistakes are part of life. Fortunately, Helix has great support for undoing them. Only in text editing, though. Helix can’t help you otherwise.

Helix remembers every change you make, and the undo command reverts the text to how it was before. If you make a change you’d like to undo, hit u in normal mode. You can press u as many times as you need.

u also accepts a count, so 10u walks back ten steps in your history. Use a really high count — like 1000u — to get the document back to the way it was before you made any edits at all.

This is a good one to remember. Because Helix is so powerful, even a few accidental keystrokes can modify the document in strange ways. At some point you’ll type something by mistake and it’ll do something you don’t expect. Undo is your safety net.

Work through the checklist below. The change can be anything — type some text, delete something, change something — and u walks you back to the state you were in before.

  1. Enter insert mode The statusline will flip to INS — press i.
  2. Make a change, then return to normal mode Type anything you like, then hit Escape.
  3. Undo the change Watch your edit disappear — press u.
Enter insert mode The statusline will flip to INS — press i.

Next: Make a change, then return to normal mode

Loading editor…