Helix's default keymap from the documentation of release 25.07.1, grouped by mode: normal-mode movement, changes and selections, the menus behind g, m, z, Space and Ctrl + W, then insert mode, select mode, pickers, prompts and a short list of typed commands. One keymap serves every system. Letters are case-sensitive, also after Alt: Alt + u and Alt + U are different commands. Entries such as ge are typed one key after the other.
Move downMoves by visual line, so a soft-wrapped line counts as several rows.
jorDown
Move upFollows visual lines; in goto mode gk steps by textual line instead.
korUp
Move right
lorRight
Move to next word startIn select mode the same key extends the selection to that point.
w
Move to previous word start
b
Move to next word end
e
Move to next WORD startThe capital motions work on WORDs, which the command list calls long words.
W
Move to previous WORD start
B
Move to next WORD end
E
Find till next characterType the target character afterwards; the motion stops just short of it.
t
Find next characterType the character to reach; unlike Vim, the lookup continues past the current line.
f
Find till previous characterWorks backwards, stopping one character short of the match.
T
Find previous characterWorks backwards to the nearest earlier occurrence of the character you type.
F
Go to line numberJump to the line number you type before the key.
G
Repeat last motionRepeats the most recent f, t, m, [ or ] motion.
Alt+.
Move to line startSame command as gh in goto mode.
Home
Move to line endSame command as gl in goto mode.
End
Move page up
Ctrl+BorPage Up
Move page down
Ctrl+ForPage Down
Move half page upThe cursor travels with the view, half a screen at a time.
Ctrl+U
Move half page down
Ctrl+D
Jump forward in jumplistTab is bound to the same command.
Ctrl+I
Jump backward in jumplistGoes back to earlier positions; Space then j lists the whole jumplist in a picker.
Ctrl+O
Save selection to jumplistRecords the selection as a jump point that the jumplist keys can return to.
Ctrl+S
Changes 31
Action
Shortcut
Replace with a characterType the replacement right after the key; it overwrites what is selected.
r
Replace with yanked textOverwrites the selection with what the yank register holds.
R
Switch caseFlips upper and lower case across the selection.
~
Convert to lower case
`
Convert to upper case
Alt+`
Insert before selectionEnters insert mode with typing placed ahead of the selection.
i
Append after selectionEnters insert mode with typing placed behind the selection.
a
Insert at line start
I
Insert at line end
A
Open line below
o
Open line above
O
Repeat last insert
.
Undo change
u
Redo change
U
Move backward in historyRuns the earlier command; typed as :earlier it also takes a step count or time span.
Alt+u
Move forward in historyCapital U with Alt; runs the later command.
Alt+U
Yank selectionCopies the selection to a register; pick one first with the " key.
y
Paste after selectionPastes from the register; with Space in front it pastes the system clipboard instead.
p
Paste before selection
P
Select a registerType the register name next; the following yank or paste then uses it.
"
Indent selection
>
Unindent selection
<
Format selectionFormatting comes from the language server, so one must be active for the file.
=
Delete selectionThe removed text is yanked as well; the Alt variant skips the yank.
d
Delete without yankingRemoves the text but leaves the register contents as they were.
Alt+d
Change selectionDeletes the selected text and goes straight into insert mode.
c
Change without yankingStarts insert mode after deleting, with nothing copied to the register.
Alt+c
Increment numberAdds one to the number or other object under the cursor.
Ctrl+A
Decrement numberSubtracts one from the number or other object under the cursor.
Ctrl+X
Record macroPress once to start and again to stop; the macro goes to the selected register.
Q
Replay macroPlays what was recorded into the selected register; macros are marked experimental.
q
Shell 6
Action
Shortcut
Pipe through shell commandEvery selection is replaced by the command's output.
|
Pipe to shell commandThe command receives every selection and whatever it prints is discarded.
Alt+|
Insert shell command outputThe output lands in front of every selection.
!
Append shell command outputThe output is added behind every selection.
Alt+!
Filter selections by shell commandOnly selections for which the command exits with status 0 survive.
$
Suspend to shell
Ctrl+Z
Selection manipulation 35
Action
Shortcut
Select regex matchesPrompts for a regex and selects every match within the current selections.
s
Split selection on regexThe matches act as separators and the text between them becomes the selections.
S
Split selection on newlinesTurns every line of a multi-line selection into a separate one.
Alt+s
Merge selections
Alt+-
Merge consecutive selections
Alt+_
Align selections in columns
&
Trim whitespace from selection
_
Collapse selection to cursor
;
Flip cursor and anchorSwaps which end of the selection the cursor sits on.
Alt+;
Make selections face forward
Alt+:
Keep only primary selectionRemoves every other selection, which ends multi-cursor editing.
,
Remove primary selection
Alt+,
Copy selection to next lineAdds another cursor on the line below.
C
Copy selection to previous lineAdds another cursor on the line above.
Alt+C
Rotate main selection backwardMakes the preceding selection the primary one.
(
Rotate main selection forwardMakes the following selection the primary one.
)
Rotate selection contents backward
Alt+(
Rotate selection contents forward
Alt+)
Select entire file
%
Select current linePressing it again grows the selection by one more line.
x
Extend to line boundsGrows every selection until it covers whole lines.
X
Shrink to line bounds
Alt+x
Join lines in selection
J
Join lines and select spaces
Alt+J
Keep selections matching regexPrompts for a regex and discards the selections that do not match.
K
Remove selections matching regexPrompts for a regex and discards the selections that match it.
Alt+K
Toggle commentsComments or uncomments the selections; Space followed by c runs the same command.
Ctrl+C
Expand to parent syntax nodeNeeds a tree-sitter grammar for the file type.
Alt+oorAlt+Up
Shrink syntax node selectionWorks only where a tree-sitter grammar exists for the language.
Alt+iorAlt+Down
Select previous sibling node
Alt+porAlt+Left
Select next sibling node
Alt+norAlt+Right
Select all sibling nodes
Alt+a
Select all child nodes
Alt+IorAlt+Shift+Down
Move to parent node end
Alt+e
Move to parent node start
Alt+b
Search 6
Action
Shortcut
Search for regex patternSearches use the / register unless a different one is chosen first.
/
Search backwardPrompts for a regex and searches in the reverse direction.
?
Select next search matchIn select mode it adds the match to the selection instead of moving to it.
n
Select previous search match
N
Search for selection as wordSets the search pattern from the selection and wraps it in \b at word boundaries.
*
Search for selectionTakes the selection as the pattern without adding word boundaries.
Alt+*
Minor modes 8
Action
Shortcut
Enter select modeMovements then extend the selection instead of replacing it.
v
Enter goto modeGoto mode holds the file, line, screen and language-server jumps.
g
Enter match modeMatch mode covers brackets, surround pairs and text objects.
m
Enter command modeOpens the prompt where typable commands such as :write are entered.
:
Enter view modeFor scrolling and aligning the view; one command, then back to normal mode.
z
Enter sticky view modeStays active until Esc is pressed, which suits reading through a file.
Z
Enter window modeWindow mode splits, closes and moves between windows; Space then w opens it too.
Ctrl+W
Enter space modeHolds mostly pickers, plus language-server actions and the clipboard keys.
Space
View mode 16
Action
Shortcut
Center line vertically
zzorzc
Align line to top
zt
Align line to bottom
zb
Align line to middleCentres the current line horizontally in the window.
zm
Scroll view downThe text scrolls while the selection stays put.
zjorzthenDown
Scroll view up
zkorzthenUp
Move page down
zthenCtrl+ForzthenPage Down
Move page up
zthenCtrl+BorzthenPage Up
Move half page up
zthenCtrl+U
Move half page down
zthenCtrl+D
Move half page up
zthenBackspace
Move half page down
zthenSpace
Search for regex pattern
z/
Search backward
z?
Select next search match
zn
Select previous search match
zN
Goto mode 23
Go-to-definition, references and the other language keys need an active language server for the file; the syntax-node, matching-bracket and function or comment jumps need a tree-sitter grammar for the file type.
Action
Shortcut
Go to file startWith a count typed first it jumps to that line instead.
gg
Go to column
g|
Go to last line
ge
Go to files in selectionsOpens the file paths or URLs that the selections contain.
gf
Go to line startRuns the same command as the Home key.
gh
Go to line endRuns the same command as the End key.
gl
Go to first non-blankLands on the first character of the line that is not whitespace.
gs
Go to top of window
gt
Go to center of window
gc
Go to bottom of window
gb
Go to definitionAsks the language server where the symbol is defined.
gd
Go to declaration
gD
Go to type definition
gy
Go to referencesAsks the language server for every place that refers to the symbol.
gr
Go to implementation
gi
Go to last accessed file
ga
Go to last modified file
gm
Go to next buffer
gn
Go to previous buffer
gp
Go to last modificationJumps to where the current file was changed most recently.
g.
Move down one textual lineIgnores soft wrap, whereas plain j steps by visual line.
gj
Move up one textual line
gk
Go to word by labelPuts a two-character label on words in view; typing one jumps there.
gw
Match mode 6
Action
Shortcut
Go to matching bracketRelies on a tree-sitter grammar for the file.
mm
Surround addType a character afterwards to wrap the selection in that pair.
ms
Surround replaceType the existing surround character, then the one that should take its place.
mr
Surround deleteType the surround character that should be removed.
md
Select around objectFollow with an object key such as w for a word, p for a paragraph or f for a function.
ma
Select inside objectTakes the same object keys as ma and selects only the inside of the object.
mi
Window mode 18
The second key may also be pressed with Ctrl still held: Ctrl-w followed by Ctrl-v splits exactly like Ctrl-w followed by v.
Action
Shortcut
Switch to next window
Ctrl+Wthenw
Split verticallyThe new window opens on the right.
Ctrl+Wthenv
Split horizontallyThe new window opens at the bottom.
Ctrl+Wthens
Open selected files in splitsEach file path in the selections opens in a horizontal split.
Ctrl+Wthenf
Open selected files side by sideCapital F: the file paths in the selections open in vertical splits.
Ctrl+WthenF
Move to left splitMoves the focus only; the capital letter swaps the windows instead.
Ctrl+WthenhorCtrl+WthenLeft
Move to split below
Ctrl+WthenjorCtrl+WthenDown
Move to split above
Ctrl+WthenkorCtrl+WthenUp
Move to right split
Ctrl+WthenlorCtrl+WthenRight
Close current window
Ctrl+Wthenq
Keep only current windowCloses all the others in one step.
Ctrl+Wtheno
Swap with left splitCapital H: the window itself changes place, while lowercase h only moves the focus.
Ctrl+WthenH
Swap with split below
Ctrl+WthenJ
Swap with split above
Ctrl+WthenK
Swap with right split
Ctrl+WthenL
Transpose splitsShown here through space mode; window mode binds the same t after Ctrl-w.
Spacethenwt
New scratch buffer belowOpens an empty scratch buffer in a horizontal split.
Spacethenwns
New scratch buffer on the rightOpens an empty scratch buffer in a vertical split.
Spacethenwnv
Space mode 26
Space followed by w opens the same window mode as Ctrl-w, so every window command can also be typed after Space, w.
Action
Shortcut
Open file pickerLists files from the root of the LSP workspace.
Spacethenf
File picker at working directoryStarts from the working directory rather than the workspace root.
SpacethenF
Open file explorerBrowses directories starting at the workspace root.
Spacethene
File explorer at buffer directoryStarts in the directory that holds the file being edited.
SpacethenE
Open buffer picker
Spacethenb
Open jumplist picker
Spacethenj
Open changed file picker
Spacetheng
Show documentationDisplays language-server documentation for what is under the cursor in a popup.
Spacethenk
Open document symbol pickerLists the symbols of the current document, as reported by the language server.
Spacethens
Open workspace symbol pickerSearches symbols across the whole workspace through the language server.
SpacethenS
Open document diagnostics pickerLists language-server diagnostics for the current document.
Spacethend
Open workspace diagnostics pickerLists language-server diagnostics for every file in the workspace.
SpacethenD
Rename symbolRenames the symbol under the cursor through the language server.
Spacethenr
Apply code actionOffers the code actions the language server has for this spot.
Spacethena
Select symbol referencesPuts a selection on every reference to the symbol at the cursor.
Spacethenh
Open last pickerBrings back the previous fuzzy picker, for example global search results after opening a file.
Spacethen'
Toggle commentsRuns the same command as Ctrl-C in normal mode.
Spacethenc
Toggle block comments
SpacethenC
Toggle line comments
SpacethenAlt+c
Paste clipboard afterReads from the system clipboard instead of a register.
Spacethenp
Paste clipboard before
SpacethenP
Yank to clipboardCopies all selections to the system clipboard.
Spacetheny
Copy main selection to clipboard
SpacethenY
Replace with clipboardOverwrites the selections with what the system clipboard holds.
SpacethenR
Global searchSearches the workspace folder and lists the hits in a fuzzy picker.
Spacethen/
Open command paletteRuns any static command by name, whether or not a key is bound to it.
Spacethen?
Debug menu 16
Action
Shortcut
Launch debug targetThe debug keys sit behind Space then G and are marked experimental.
SpacethenGl
Restart debug session
SpacethenGr
Toggle breakpoint
SpacethenGb
Continue execution
SpacethenGc
Pause execution
SpacethenGh
Step in
SpacethenGi
Step out
SpacethenGo
Step to next
SpacethenGn
List variables
SpacethenGv
End debug session
SpacethenGt
Edit breakpoint condition
SpacethenGthenCtrl+C
Edit breakpoint log message
SpacethenGthenCtrl+L
Switch thread
SpacethenGst
Switch stack frame
SpacethenGsf
Enable exception breakpoints
SpacethenGe
Disable exception breakpoints
SpacethenGE
Unimpaired 24
Action
Shortcut
Go to next diagnosticDiagnostics come from the language server, so one must be running.
]d
Go to previous diagnostic
[d
Go to last diagnostic
]D
Go to first diagnostic
[D
Go to next functionUses tree-sitter text objects, so the language needs its query file.
]f
Go to previous function
[f
Jump to next type definition
]t
Jump to previous type definition
[t
Go to next argument
]a
Go to previous argument
[a
Go to next comment
]c
Go to previous comment
[c
Go to next test
]T
Go to previous test
[T
Go to next paragraph
]p
Go to previous paragraph
[p
Go to next change
]g
Go to previous change
[g
Go to last change
]G
Go to first change
[G
Go to next pairing
]e
Go to previous pairing
[e
Add newline below
]thenSpace
Add newline above
[thenSpace
Insert mode 21
Action
Shortcut
Switch to normal modeText changes are saved for undo only at this point.
Esc
Commit undo checkpointMarks an undo step without leaving insert mode.
Ctrl+S
Trigger autocomplete
Ctrl+X
Insert register content
Ctrl+R
Delete previous wordThe same two keys remove a word in the prompt as well.
Ctrl+WorAlt+Backspace
Delete next word
Alt+dorAlt+Delete
Delete to line start
Ctrl+U
Delete to line end
Ctrl+K
Delete previous character
Ctrl+HorBackspaceorShift+Backspace
Delete next character
Ctrl+DorDelete
Insert new line
Ctrl+JorEnter
Smart tabInserts a tab when only whitespace is left of every cursor; otherwise runs a separate command.
Tab
Insert tab character
Shift+Tab
Move to previous lineThe arrow and paging keys are kept for newcomers and can be disabled in config.toml.
Up
Move to next line
Down
Move back one character
Left
Move forward one character
Right
Move one page up
Page Up
Move one page down
Page Down
Go to line start
Home
Go to line end
End
Select mode 28
Action
Shortcut
Return to normal modeThe key that entered select mode also leaves it.
v
Exit select mode
Esc
Extend left
horLeft
Extend right
lorRight
Extend down
jorDown
Extend up
korUp
Extend to next word start
w
Extend to previous word start
b
Extend to next word end
e
Extend to next WORD start
W
Extend to previous WORD start
B
Extend to next WORD end
E
Extend till next character
t
Extend to next character
f
Extend till previous character
T
Extend to previous character
F
Add next search matchKeeps what is selected and adds the following match, where normal mode would replace it.
n
Add previous search match
N
Extend to file startWith a count typed first it extends to that line number.
gg
Extend to last line
ge
Extend down one textual line
gj
Extend up one textual line
gk
Extend to line endGoto motions extend too: typed after v, it selects through to where the line stops.
gl
Extend to line start
Home
Extend to line end
End
Extend to word by label
gw
Extend to parent node end
Alt+e
Extend to parent node start
Alt+b
Completion menu and popups 8
Action
Shortcut
Scroll popup upApplies to the documentation popup; its keys cannot be remapped.
Ctrl+U
Scroll popup down
Ctrl+D
Previous completion entry
Shift+TaborCtrl+PorUp
Next completion entry
TaborCtrl+NorDown
Accept completionCloses the menu and inserts the highlighted item.
Enter
Reject completionCloses the menu and inserts nothing; any other key press accepts the item.
Ctrl+C
Previous signatureSteps back in the signature-help popup.
Alt+p
Next signature
Alt+n
Picker 12
The prompt keys also work inside a picker, except where a picker key uses the same binding.
Action
Shortcut
Previous entry
Shift+TaborUporCtrl+P
Next entry
TaborDownorCtrl+N
Scroll one page up
Page UporCtrl+U
Scroll one page down
Page DownorCtrl+D
Go to first entry
Home
Go to last entry
End
Open selected entry
Enter
Open in backgroundThe picker stays open, so several entries can be opened in a row.
Alt+Enter
Open in horizontal split
Ctrl+S
Open in vertical split
Ctrl+V
Toggle preview
Ctrl+T
Close picker
EscorCtrl+C
Prompt 20
Action
Shortcut
Close prompt
EscorCtrl+C
Move back one word
Alt+borCtrl+Left
Move back one character
Ctrl+BorLeft
Move forward one word
Alt+forCtrl+Right
Move forward one character
Ctrl+ForRight
Move to prompt end
Ctrl+EorEnd
Move to prompt start
Ctrl+AorHome
Delete previous word
Ctrl+WorAlt+BackspaceorCtrl+Backspace
Delete next word
Alt+dorAlt+DeleteorCtrl+Delete
Delete to start of input
Ctrl+U
Delete to end of input
Ctrl+K
Delete previous character
BackspaceorCtrl+HorShift+Backspace
Delete next character
DeleteorCtrl+D
Insert word under cursorCopies the word at the document cursor into the prompt.
Ctrl+S
Previous history entry
Ctrl+PorUp
Next history entry
Ctrl+NorDown
Insert contents of a registerType the register character right after the chord.
Ctrl+R
Next completion item
Tab
Previous completion itemThe keymap page names this key BackTab.
Shift+Tab
Open selected item
Enter
Typed commands 34
Action
Shortcut
Write buffer to diskLong form :write; an optional path saves to that file instead.
:w
Force writeCreates missing parent directories while saving.
:w!
Close current viewLong form :quit; :q! closes the view even with unsaved changes.
:q
Write and close viewAlso typed as :x or :write-quit.
:wq
Write all buffersLong form :write-all; saves the changes of every buffer.
:wa
Close all viewsLong form :quit-all; :qa! does the same while ignoring unsaved changes.
:qa
Write all and closeAlso typed as :xa or :write-quit-all.
:wqa
Open a fileAlso typed :o, :edit or :e; the file loads in the current view.
:open
New scratch bufferThe short form of this command is :n.
:new
Close current bufferThe long form is :buffer-close; :bc! skips the unsaved-changes check.
:bc
Close other buffersThe long form is :buffer-close-others; the focused buffer stays open.
:bco
Write if modifiedSaves only when the file has been modified; :u is the short form.
:update
Reload from diskThrows away unsaved changes and reads the source file again; :rl is the short form.
:reload
Open file in vertical splitThe long form is :vsplit; :vnew opens a scratch buffer that way.
:vs
Open file in horizontal splitAlso typed :hsplit or :sp; :hnew does it with a scratch buffer.
:hs
Format fileRuns an external formatter or the language server; :fmt is the short form.
:format
Change themeWith no name given it reports the theme in use.
:theme
Set config optionChanges an option for the running session; the long form is :set-option.
:set
Toggle config optionFlips an on/off option, for example :toggle search.smart-case.
:toggle
Set buffer languageLong form :set-language; with no value it reports the language in use.
:lang
Open user configOpens the user's config.toml for editing.
:config-open
Reload user config
:config-reload
Open the tutorial
:tutor
Run shell commandThe long form is :run-shell-command; :! is a second alias.
:sh
Pipe selections to shell commandThe selections are sent through the command; :| is the short form.
:pipe
Sort selections
:sort
Hard-wrap selected linesRewraps the lines of the selection at the width you give.
:reflow
Restart language serversWith no arguments it restarts the servers the current file uses.
:lsp-restart
Open log file
:log-open
Change working directoryThe long form is :change-current-directory.
:cd
Show working directoryThe long form of this command is :show-directory.
:pwd
Go to line numberType the line number as the argument; :g is the short form.
:goto
Go back in edit historyTakes a step count or a time span; :later moves the other way.
:earlier
Move file to new pathMoves the buffer together with its file; :mv is the short form.
:move
No row on this page matches that filter.
Notes
Select, then act
In Normal mode every motion makes a selection: w selects to the next word start, x selects the current line and pressing it again extends by a line, % selects the whole file. Then d deletes, c changes, y yanks the selection — there is no operator-pending mode. s is the key Vim users miss most: it prompts for a regex and turns every match inside the selection into its own cursor, so "change every foo in this function" is x a few times, s, type foo, then c. , collapses back to one cursor and ; collapses a selection to its cursor.
Structural selection
Because Helix parses code with tree-sitter, Alt + o expands the selection to the enclosing syntax node and Alt + i shrinks it back; Alt + n and Alt + p move to sibling nodes. mi and ma select inside or around a text object — brackets, quotes, or tree-sitter objects such as a function or argument — and mm jumps to the matching bracket. The bracket-pair keys ]f and [f step between functions, ]d and [d between diagnostics.
Mode menus
A leading key opens a menu that shows its options on screen, so the second key never has to be memorised. g is goto: gd definition, gr references, gg file start, ge file end. Space is the picker menu: Space, f files, Space, b buffers, Space, s symbols, Space, a code actions, Space, r rename, Space, / global search. Ctrl + W is window mode with Ctrl + W, v and Ctrl + W, s for vertical and horizontal splits; the second letter is case-sensitive, and a capital Ctrl + W, H swaps windows where the lowercase letter only moves the focus. : opens the command line, where :q, :w and :tutor live.
Questions
How is Helix different from Vim?
The order is reversed: select a region first, then apply an action. Motions select as they move, and multiple cursors replace most macros.
How do I exit Helix?
Press Escape to return to Normal mode, then type :q and Enter (or :wq to save first). With several splits open, :qa closes all views at once.
How do I edit every occurrence of a word at once?
Select the region (x for lines, % for the file), press s, type the pattern and press Enter. Each match becomes a cursor; c changes them all.
Do I need to configure a language server?
Helix ships its language configuration, but language-server features work only once the matching server is installed and set up. Run hx --health in a terminal to check the language support of your installation.