Skip to content

NORMAL mode

Commands:

Key Action
% SELECT all text in buffer
i, I Enter INSERT mode
a / A Append after cursor / at end of line, then INSERT
w / W Progress one word
o / O Open a line below / above, then INSERT
Esc Return to NORMAL mode, cancel SELECT mode or cancel a prompt
h j k l, arrows Move
Home / End Start / end of line
Ctrl+Home / Ctrl+End Start / end of document
PageUp / PageDown Move by one screen
gg / ge / gp First line / last line / previous location
x / X Select the current line; repeat to extend by one line
v / V Enter SELECT mode at the cursor
d / D, Delete Delete the character/selection under the cursor
u / Ctrl+R Undo / redo
Ctrl+Space Request LSP completions in INSERT mode
Ctrl+E Toggle a debug breakpoint on the current line (experimental DAP)
: Open the Ex command line
Ctrl+P Open the command palette
/ Search inside the current file (literal)
\ Search inside the current file with a regular expression
' Regex search and replace inside the current file
. Select every match of a search term, then edit them together (NORMAL or SELECT)

SPACE menu

Key Action
Space / Search across files
Space . Find/replace across files
Space \ Regex Find/replace across files
Space F Open file picker
Space Y Yank selection to clipboard
Space X Cut selection to clipboard
Space p Paste on the current line
Space P Paste on a new line
Space K LSP hover
Space A LSP code actions
Space S LSP document symbols
Space D LSP workspace diagnostics
Space d LSP document diagnostics
Space z LSP see full diagnostic under cursor
Space b Toggle breakpoint

CROSS mode

These are commands that work across all modes.

Key Action
Ctrl-B Open file explorer sidebar
: Open command bar
ESC Shift focus out
Shift-C Multi-cursor select
Ctrl-C Comment out line (if supported by language)