Step 1 of 6

Editing text with Helix is like speaking a language

Editing text with Helix is like speaking a language

One of the biggest differentiators between Helix and other text editors is how Helix encourages you to speak a language for editing text. We’ve already seen the basic grammar in earlier lessons: first make a selection, then act on it. This time, we’re going to dive deep into the part of that language that describes structure.

Fluency in other editors might be measured by how many shortcuts you have memorized. Helix is different — it’s not about how many key bindings you can remember, but about how precisely you can describe the text you want to change. Helix has a vocabulary of selections and a vocabulary of actions, and every selection works with every action.

As an example: let’s say you want to delete everything inside a pair of parentheses. In other editors, you’d probably highlight it by hand and hit backspace — or, if you’re lucky, there’ll be a shortcut for exactly that case. With Helix, you can think to yourself:

  • I know how to select inside a pair of parentheses — that’s mi(
  • I know how to delete a selection — that’s d
  • Therefore, deleting inside the parentheses is mi( followed by d

The m key is the door into match mode, Helix’s vocabulary for brackets, quotes, and other paired structure. That’s this lesson’s subject.

Let’s try this in the editor first. Work through the checklist below to clear out the argument list.

  1. Select everything inside the parentheses Put your cursor anywhere between the ( and ) on the last line, then type mi(.
  2. Delete the selection With the argument list highlighted, press d.
Select everything inside the parentheses Put your cursor anywhere between the ( and ) on the last line, then type mi(.

Next: Delete the selection

Loading editor…