Helix mode
Helix mode brings Helix’s select-then-act editing to Tyrn. It is a work in progress, and not every Helix binding is implemented. It builds on Vim mode, so settings, ex commands and most of the Vim page apply here too.
Turn it on
Run workspace: toggle helix mode from the command palette, or set:
{ "helix_mode": true }Turning on helix_mode also turns on vim_mode. To start in Helix normal mode, set vim.default_mode to "helix_normal".
Keys that differ from Vim
In Helix normal mode you select first, then act on the selection.
| Task | Keys |
|---|---|
| Select the current line | x, shift-x |
| Select all | % |
| Select with a regex | s |
| Collapse the selection | ; |
| Keep only the newest selection | , |
| Duplicate the cursor below, above | shift-c, alt-shift-c |
| Delete, delete without yanking | d, alt-d |
| Change, change without yanking | c, alt-c |
| Yank, paste | y, p |
| Toggle line comment | ctrl-c |
| Larger, smaller syntax node | alt-o, alt-i |
| Previous, next sibling node | alt-p, alt-n |
| Next, previous match | n, shift-n |
| Command palette | : |
f, t, shift-f and shift-t search across lines.
Goto with g
| Keys | Action |
|---|---|
g e |
End of the file |
g h, g l |
Start, end of the line |
g s |
First non-blank character |
g t, g c, g b |
Top, middle, bottom of the window |
g r |
Find all references |
g i |
Go to implementation |
g a |
Alternate file |
g n, g p |
Next, previous buffer |
g w |
Jump to a word using on-screen labels |
g . |
Last modification |
g o, g O |
Toggle the diff hunk, toggle staged |
g u, g U |
Stage and next, unstage and next |
Match with m
m m jumps to the matching bracket. m s adds a surround, m r replaces one and m d deletes one.
Space menu
Press space for these shortcuts.
| Keys | Action |
|---|---|
space f |
File finder |
space b |
Tab switcher |
space s, space S |
Symbols in the file, in the project |
space d |
Next diagnostic |
space r |
Rename |
space a |
Code actions |
space k |
Hover |
space / |
Project search |
space c |
Toggle comment |
space y, space p |
Copy, paste |
space w v, space w s |
Split right, split down |
space w h, j, k, l |
Move to the pane left, down, up, right |
space w q |
Close the pane |
Debugging has its own prefix, space G: l starts, b toggles a breakpoint, c continues, n steps over, i steps into, o steps out, h pauses, r restarts and t stops.
Text objects
Anything that works with m i or m a also works with ] and [. For example, ] ( selects the next pair of parentheses. Some objects follow Helix’s meaning:
m i mandm a mselect the closest surrounding pair of brackets, quotes, backticks or bars. They use the syntax tree, so delimiters inside strings and comments are skipped.tis a type or class,cis a comment andxis an HTML element.