Selection makes everything else easy
Helix editing follows one pattern: first make a selection, then act on it.
Vim does it the other way around — you name the verb first and the object
second, as in dw for “delete a word”. In Helix you select the word first and
then press d. The order is object, then verb.
The advantage is that you can always see what you’re about to edit. The selection is highlighted before anything happens to it, so there are no surprises.
There are several ways to make a selection in normal mode:
- word motions like
w,b, andeselect from the cursor to wherever they land xselects the current line (press it again to extend to the next line)%selects the whole file
Line motions like j and k only move the cursor — they leave a one-character
selection behind. Extending a selection as you move up and down needs select
mode, which we’ll cover in a later lesson.
Once you have a selection, you act on it with a single key: d to delete, c
to change, y to yank. Work through the checklist below to make a few
selections. Nothing is changed yet — that comes in the next step.