Thinking in Helix: A Practical Introduction


Jul 23, 2025 See all posts

If you’re a developer interested in productivity, you’ve likely heard of Vim. You know it’s not just an editor, but a powerful concept—a language for manipulating text at the speed of thought. But what if that language could be even more intuitive, with modern features built-in from the ground up?

Enter Helix, a post-modern text editor written in Rust. It takes inspiration from Vim and other editors like Kakoune, but it isn’t a clone. It’s a re-imagining.

Why not just use Vim? Vim is legendary, but often requires a significant investment in configuration to feel modern. Helix is designed to work brilliantly out-of-the-box, with zero setup. It comes with pre-configured support for Tree-sitter (for superior syntax highlighting and code navigation) and Language Server Protocol (for diagnostics, code completion, and go-to-definition).

Most importantly, it makes a fundamental change to the “Vim grammar” that many find more intuitive. This guide will teach you how to think in Helix. We’ll skip the installation and focus on the 80% of the editor that will provide 100% of your initial productivity.

The One Big Idea: Select, Then Act

If you remember only one thing, make it this: Helix reverses Vim’s grammar.

This small change is a profound philosophical shift. You always see what you’re about to change before you change it. The editor provides constant feedback, which makes learning and operating it feel more predictable and less error-prone. In Helix, a cursor is just a selection of width 1. Movement is selection.

The Building Blocks: Your Editing Grammar

Let’s learn the core vocabulary. Forget the huge keymap tables for now; these are the essentials.

1. Movement & Selection (The Where)

Because movement is selection, these commands are your primary way of interacting with text.

Key(s)ActionHow to Think About It
h j k lMove left/down/up/rightThe classic Vim arrows.
wSelect to the start of the next word”Word”
bSelect to the beginning of the word”Back”
eSelect to the end of the word”End”
xSelect the current line”extend line”
%Select the entire fileThe “whole thing”
gh / glGo to the start/end of the line”Go home” / “Go last”

2. Text Objects: The Power of m

How do you select the text inside a pair of parentheses or quotes? With text objects! In Helix, text objects live under the m key (“match”). The pattern is simple: m + i/a + character.

KeystrokeAction
miwSelect inside the current word.
mipSelect inside the current paragraph.
mi(Select inside the parentheses ().
mi"Select inside the double quotes "".

Put your cursor inside some "quoted text" and press mi". The text is instantly selected. Now you’re ready to perform an action.

3. Actions (The What)

You’ve made your selection. Now what do you want to do with it?

KeyAction
dDelete selection.
cChange selection (deletes, then enters Insert mode).
yYank (copy) selection.
pPaste after selection.
rReplace selection with the next character you type.
iEnter Insert mode before the selection.
aAppend; enter Insert mode after the selection.
u / UUndo / Redo
EscReturn to Normal mode.

Let’s put it all together (Intentional Repetition!): Now that you know how to select and how to act, you know how to do almost anything.

4. Registers (Named Clipboards)

When you yank or delete text, it goes into a default clipboard. But what if you want to copy or cut multiple different things? Use registers! A register is just a named clipboard.

The " key is your gateway to registers.

Example Workflow: Swapping two functions.

  1. Go to the first function. Select it with mif (match inside function).
  2. Yank it into register a: "ay.
  3. Go to the second function. Select it with mif.
  4. Yank it into register b: "by.
  5. Now, go back to the first function’s location. Select the function again with mif.
  6. Paste from register b to replace it: "bp.
  7. Do the same for the second function’s location, pasting from register a: "ap.

The Superpowers: High-Leverage Editing

Once you’re comfortable with the basics, these tools will multiply your efficiency.

1. Multiple Selections

Here’s where Helix truly shines. You can create multiple selections and edit them all at once. The most common way to do this is with search.

Workflow: Rename a variable.

  1. Move your cursor to an instance of the variable.
  2. Press w to select it.
  3. Press s (select all regex matches). Helix finds every occurrence of that word in the file and creates a cursor at each one.
  4. Press c (change). Now type the new variable name. You are editing all occurrences simultaneously.
  5. Press Escape when you’re done.

2. Macros: Automating Repetition

A macro is simply a recording of your keystrokes that you can replay. In Helix, macros are stored in registers—just like text!

Workflow: Add a prefix to several lines.

  1. Move to the start of the first line.
  2. Press Q to start recording a macro (it will ask for a register, let’s use a).
  3. Press I to enter insert mode at the start of the line, type your prefix, and press Escape.
  4. Press j to move down to the next line.
  5. Press Q again to stop recording.
  6. Now, just press q to replay the macro from register a. Press it repeatedly to apply the change to the next lines.

3. The Shell Pipe: Your Ultimate Filter

You can leverage the entire ecosystem of command-line tools directly on your text. The | (pipe) key sends your current selection to an external command and replaces it with the output.

Example: Sorting lines.

  1. Select several lines of text (e.g., by holding x and pressing j a few times).
  2. Press | to bring up the shell command prompt.
  3. Type sort and press Enter.
  4. The selected lines are instantly sorted.

You can use this with any shell command: uniq, awk, or even jq to format a selected JSON block.

The Everyday Workflow: Interacting with Your Project

Helix comes with “batteries included” for project-wide tasks.

The Spacebar Menu: Your Command Center

The Space key is your best friend. It opens a menu of common, powerful actions.

KeystrokeAction
Space + fOpen the file picker. Fuzzy find any file in your project.
Space + /Global search. Search for a string across your entire project.
Space + kKnowledge/Hover. Shows documentation for the symbol under the cursor.
Space + ?Command palette. Search for any Helix command.

Zero-Config IDE Features

Thanks to built-in LSP and Tree-sitter, you get these smarts for free.

KeystrokeAction
gdGo to definition.
grGo to references.
[f / ]fGo to the previous/next function.
[t / ]tGo to the previous/next type (class, struct).
[d / ]dGo to the previous/next diagnostic (error/warning).

Level Up: A Glimpse into Advanced Helix

When you’re comfortable and want to make the editor truly yours, here’s where to look next.

The Helix 80/20 Cheatsheet

ConceptKeystrokes & Examples
The Core Loopselection -> action. (e.g., w to select, d to delete).
Modesi → Insert, v → Select, Esc → Normal.
Essential Selectionsw,b,e (words), x (line), % (file), gh,gl (line ends).
Essential Actionsd (delete), c (change), y (yank), p (paste), r (replace).
Text Objects (m)miw (in word), mip (in paragraph), mi” (in ”), mi( (in ().
Registers”a prefix. “ay (yank to a), “ap (paste from a).
MacrosQ + register (start/stop record), q (replay from last register).
Shell PipeSelect text, then `
Multiple Selectionss (select all regex matches), S (split selection on regex).
Project NavigationSpace f (file picker), Space / (global search).
Code Intelligencegd (definition), Space k (docs/hover), [f / ]f (jump function).
Undo / Redou (undo), U (redo).

Enjoyed the article? I write about 1-2 a month. Subscribe via email or RSS feed.