Step 5 of 5

What counts as a change

What counts as a change

Every command in this lesson steps through the same history, so it helps to know how Helix divides it up.

Each normal mode command that edits the buffer is one step: a d, a p, or a c together with everything you type before leaving insert mode. A whole insert session, however long, is a single step — hit Escape between two sentences if you want to be able to undo them separately.

Undoing also restores your selection. Undo a deletion and the text comes back selected, ready for a different command.

One thing Helix doesn’t do yet is remember the history after you close a file. When you quit, the tree is gone. Vim can persist its undo history to disk; in Helix, u only reaches back as far as the current session.

Try it in the editor: press i, type two short sentences with an Escape between them, then count how many times you press u before both are gone.

Loading editor…