Helix cheat sheet

112 shortcuts in 16 lessons

Reading a list won't make them stick. ShortcutFoo has you type each shortcut, then brings it back just before you'd forget it.

Essentials I

7 shortcuts
  • h
    Move left
  • j
    Move down
  • k
    Move up
  • l
    Move right
  • w
    Move to the next word start
  • b
    Move to the previous word start
  • e
    Move to the next word end

Essentials II

7 shortcuts
  • i
    Insert before the selection
  • a
    Append after the selection
  • i
    Insert at the start of the line
  • a
    Insert at the end of the line
  • o
    Open a new line below
  • o
    Open a new line above
  • ESC
    Return to normal mode

Editing I

7 shortcuts
  • d
    Delete the selection
  • c
    Change the selection
  • y
    Yank the selection
  • p
    Paste after the selection
  • p
    Paste before the selection
  • u
    Undo
  • u
    Redo

Selections I

7 shortcuts
  • x
    Select the current line
  • %
    Select the entire file
  • ;
    Collapse to a single cursor
  • ⌥;
    Flip the cursor and anchor
  • ,
    Keep only the primary selection
  • c
    Add a cursor below
  • ⌥⇧C
    Add a cursor above

Long words and characters

7 shortcuts
  • w
    Move to the next long word start
  • b
    Move to the previous long word start
  • e
    Move to the next long word end
  • f
    Find the next character
  • t
    Move till the next character
  • f
    Find the previous character
  • ⌥.
    Repeat the last motion

Editing II

7 shortcuts
  • r
    Replace with a character
  • r
    Replace with yanked text
  • j
    Join lines
  • >
    Indent the selection
  • <
    Unindent the selection
  • ⌥D
    Delete without yanking
  • .
    Repeat the last insert

Case and numbers

7 shortcuts
  • `
    Switch case
  • `
    Make lowercase
  • ⌥`
    Make uppercase
  • ^A
    Increment the number
  • ^X
    Decrement the number
  • ^C
    Toggle comments
  • =
    Format the selection

Search

7 shortcuts
  • /
    Search forward
  • ?
    Search backward
  • n
    Select the next match
  • n
    Select the previous match
  • *
    Search for the selection
  • v
    Enter select mode
  • :
    Enter command mode

Selections II

7 shortcuts
  • s
    Select regex matches in the selection
  • s
    Split the selection on a regex
  • ⌥S
    Split the selection on newlines
  • k
    Keep selections matching a regex
  • ⌥⇧K
    Remove selections matching a regex
  • &
    Align selections in columns
  • _
    Trim whitespace from selections

Goto mode I

7 shortcuts
  • gg
    Go to the start of the file
  • ge
    Go to the end of the file
  • gh
    Go to the start of the line
  • gl
    Go to the end of the line
  • gs
    Go to the first non-blank character
  • gd
    Go to the definition
  • gr
    Go to references

Match mode

7 shortcuts
  • mm
    Go to the matching bracket
  • ms(
    Surround with parentheses
  • md(
    Delete surrounding parentheses
  • mr([
    Replace parentheses with brackets
  • miw
    Select inside a word
  • mi(
    Select inside parentheses
  • maf
    Select around a function

Space mode I

7 shortcuts
  • f
    Open the file picker
  • b
    Open the buffer picker
  • /
    Search the workspace
  • k
    Show documentation
  • r
    Rename the symbol
  • a
    Apply a code action
  • s
    Open the symbol picker

Space mode II

7 shortcuts
  • d
    Open the diagnostics picker
  • e
    Open the file explorer
  • y
    Yank to the clipboard
  • p
    Paste from the clipboard
  • '
    Open the last picker
  • ?
    Open the command palette
  • j
    Open the jumplist picker

Windows

7 shortcuts
  • wv
    Split vertically
  • ws
    Split horizontally
  • ww
    Switch to the next window
  • wh
    Move to the left split
  • wl
    Move to the right split
  • wq
    Close the window
  • wo
    Close all other windows

Code navigation

7 shortcuts
  • ]d
    Go to the next diagnostic
  • [d
    Go to the previous diagnostic
  • ]f
    Go to the next function
  • [f
    Go to the previous function
  • ]g
    Go to the next change
  • [g
    Go to the previous change
  • ]
    Add a newline below

View, jumps and macros

7 shortcuts
  • zz
    Center the line
  • zt
    Align the line to the top
  • zb
    Align the line to the bottom
  • ^O
    Jump back on the jumplist
  • q
    Record a macro
  • q
    Play back a macro
  • |
    Pipe selections through a shell command
Achievement unlocked