Helix Editor keyboard shortcuts

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.

363 shortcuts in 19 sections. Checked row by row against Helix documentation: Keymap (book/src/keymap.md, release 25.07.1) on . Edited by Jay.

Normal mode movement 25

ActionShortcut
Move lefthorLeft
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 rightlorRight
Move to next word startIn select mode the same key extends the selection to that point.w
Move to previous word startb
Move to next word ende
Move to next WORD startThe capital motions work on WORDs, which the command list calls long words.W
Move to previous WORD startB
Move to next WORD endE
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 upCtrl+BorPage Up
Move page downCtrl+ForPage Down
Move half page upThe cursor travels with the view, half a screen at a time.Ctrl+U
Move half page downCtrl+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

ActionShortcut
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 caseAlt+`
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 startI
Insert at line endA
Open line belowo
Open line aboveO
Repeat last insert.
Undo changeu
Redo changeU
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 selectionP
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

ActionShortcut
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 shellCtrl+Z

Selection manipulation 35

ActionShortcut
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 selectionsAlt+-
Merge consecutive selectionsAlt+_
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 forwardAlt+:
Keep only primary selectionRemoves every other selection, which ends multi-cursor editing.,
Remove primary selectionAlt+,
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 backwardAlt+(
Rotate selection contents forwardAlt+)
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 boundsAlt+x
Join lines in selectionJ
Join lines and select spacesAlt+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 nodeAlt+porAlt+Left
Select next sibling nodeAlt+norAlt+Right
Select all sibling nodesAlt+a
Select all child nodesAlt+IorAlt+Shift+Down
Move to parent node endAlt+e
Move to parent node startAlt+b

Minor modes 8

ActionShortcut
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

ActionShortcut
Center line verticallyzzorzc
Align line to topzt
Align line to bottomzb
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 upzkorzthenUp
Move page downzthenCtrl+ForzthenPage Down
Move page upzthenCtrl+BorzthenPage Up
Move half page upzthenCtrl+U
Move half page downzthenCtrl+D
Move half page upzthenBackspace
Move half page downzthenSpace
Search for regex patternz/
Search backwardz?
Select next search matchzn
Select previous search matchzN

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.

ActionShortcut
Go to file startWith a count typed first it jumps to that line instead.gg
Go to columng|
Go to last linege
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 windowgt
Go to center of windowgc
Go to bottom of windowgb
Go to definitionAsks the language server where the symbol is defined.gd
Go to declarationgD
Go to type definitiongy
Go to referencesAsks the language server for every place that refers to the symbol.gr
Go to implementationgi
Go to last accessed filega
Go to last modified filegm
Go to next buffergn
Go to previous buffergp
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 linegk
Go to word by labelPuts a two-character label on words in view; typing one jumps there.gw

Match mode 6

ActionShortcut
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.

ActionShortcut
Switch to next windowCtrl+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 belowCtrl+WthenjorCtrl+WthenDown
Move to split aboveCtrl+WthenkorCtrl+WthenUp
Move to right splitCtrl+WthenlorCtrl+WthenRight
Close current windowCtrl+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 belowCtrl+WthenJ
Swap with split aboveCtrl+WthenK
Swap with right splitCtrl+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.

ActionShortcut
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 pickerSpacethenb
Open jumplist pickerSpacethenj
Open changed file pickerSpacetheng
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 commentsSpacethenC
Toggle line commentsSpacethenAlt+c
Paste clipboard afterReads from the system clipboard instead of a register.Spacethenp
Paste clipboard beforeSpacethenP
Yank to clipboardCopies all selections to the system clipboard.Spacetheny
Copy main selection to clipboardSpacethenY
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

ActionShortcut
Launch debug targetThe debug keys sit behind Space then G and are marked experimental.SpacethenGl
Restart debug sessionSpacethenGr
Toggle breakpointSpacethenGb
Continue executionSpacethenGc
Pause executionSpacethenGh
Step inSpacethenGi
Step outSpacethenGo
Step to nextSpacethenGn
List variablesSpacethenGv
End debug sessionSpacethenGt
Edit breakpoint conditionSpacethenGthenCtrl+C
Edit breakpoint log messageSpacethenGthenCtrl+L
Switch threadSpacethenGst
Switch stack frameSpacethenGsf
Enable exception breakpointsSpacethenGe
Disable exception breakpointsSpacethenGE

Unimpaired 24

ActionShortcut
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

ActionShortcut
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 autocompleteCtrl+X
Insert register contentCtrl+R
Delete previous wordThe same two keys remove a word in the prompt as well.Ctrl+WorAlt+Backspace
Delete next wordAlt+dorAlt+Delete
Delete to line startCtrl+U
Delete to line endCtrl+K
Delete previous characterCtrl+HorBackspaceorShift+Backspace
Delete next characterCtrl+DorDelete
Insert new lineCtrl+JorEnter
Smart tabInserts a tab when only whitespace is left of every cursor; otherwise runs a separate command.Tab
Insert tab characterShift+Tab
Move to previous lineThe arrow and paging keys are kept for newcomers and can be disabled in config.toml.Up
Move to next lineDown
Move back one characterLeft
Move forward one characterRight
Move one page upPage Up
Move one page downPage Down
Go to line startHome
Go to line endEnd

Select mode 28

ActionShortcut
Return to normal modeThe key that entered select mode also leaves it.v
Exit select modeEsc
Extend lefthorLeft
Extend rightlorRight
Extend downjorDown
Extend upkorUp
Extend to next word startw
Extend to previous word startb
Extend to next word ende
Extend to next WORD startW
Extend to previous WORD startB
Extend to next WORD endE
Extend till next charactert
Extend to next characterf
Extend till previous characterT
Extend to previous characterF
Add next search matchKeeps what is selected and adds the following match, where normal mode would replace it.n
Add previous search matchN
Extend to file startWith a count typed first it extends to that line number.gg
Extend to last linege
Extend down one textual linegj
Extend up one textual linegk
Extend to line endGoto motions extend too: typed after v, it selects through to where the line stops.gl
Extend to line startHome
Extend to line endEnd
Extend to word by labelgw
Extend to parent node endAlt+e
Extend to parent node startAlt+b

Completion menu and popups 8

ActionShortcut
Scroll popup upApplies to the documentation popup; its keys cannot be remapped.Ctrl+U
Scroll popup downCtrl+D
Previous completion entryShift+TaborCtrl+PorUp
Next completion entryTaborCtrl+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 signatureAlt+n

Picker 12

The prompt keys also work inside a picker, except where a picker key uses the same binding.

ActionShortcut
Previous entryShift+TaborUporCtrl+P
Next entryTaborDownorCtrl+N
Scroll one page upPage UporCtrl+U
Scroll one page downPage DownorCtrl+D
Go to first entryHome
Go to last entryEnd
Open selected entryEnter
Open in backgroundThe picker stays open, so several entries can be opened in a row.Alt+Enter
Open in horizontal splitCtrl+S
Open in vertical splitCtrl+V
Toggle previewCtrl+T
Close pickerEscorCtrl+C

Prompt 20

ActionShortcut
Close promptEscorCtrl+C
Move back one wordAlt+borCtrl+Left
Move back one characterCtrl+BorLeft
Move forward one wordAlt+forCtrl+Right
Move forward one characterCtrl+ForRight
Move to prompt endCtrl+EorEnd
Move to prompt startCtrl+AorHome
Delete previous wordCtrl+WorAlt+BackspaceorCtrl+Backspace
Delete next wordAlt+dorAlt+DeleteorCtrl+Delete
Delete to start of inputCtrl+U
Delete to end of inputCtrl+K
Delete previous characterBackspaceorCtrl+HorShift+Backspace
Delete next characterDeleteorCtrl+D
Insert word under cursorCopies the word at the document cursor into the prompt.Ctrl+S
Previous history entryCtrl+PorUp
Next history entryCtrl+NorDown
Insert contents of a registerType the register character right after the chord.Ctrl+R
Next completion itemTab
Previous completion itemThe keymap page names this key BackTab.Shift+Tab
Open selected itemEnter

Typed commands 34

ActionShortcut
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

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.

Sources and checks

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.