Keyboard shortcuts

The default keys for finding, editing, folding and the agent, on macOS, Windows and Linux.

macOS keys; on Windows and Linux cmd is ctrl, except where a column says otherwise. Every key can be changed in Settings → Keyboard Shortcuts or in YAML; see Configuration.

Find and replace#

Action macOS Windows/Linux
Find in file cmd+f ctrl+f
Replace in file cmd+r ctrl+r
Search in project cmd+shift+f ctrl+shift+f
Next / previous match enter / shift+enter enter / shift+enter
Replace (in the replace field) / replace all enter / cmd+enter enter / ctrl+enter
Match case, whole word, regex cmd+alt+c, cmd+alt+w, cmd+alt+r alt+c, alt+w, alt+r
Find in selection, preserve case cmd+alt+l, cmd+alt+p alt+l, alt+p
Close find escape escape

Cursor movement and selection#

Action macOS Windows/Linux
Move by word alt+left / alt+right ctrl+left / ctrl+right
Delete by word alt+backspace / alt+delete ctrl+backspace / ctrl+delete
Start / end of line (first press goes to the first non-blank) cmd+left / cmd+right home / end
Start / end of file cmd+up / cmd+down ctrl+home / ctrl+end
Extend the selection add shift to any of these add shift to any of these
Extend the selection to a click shift+click shift+click
Add a cursor alt+click alt+click
Column selection alt+shift+drag alt+shift+drag
Add cursor above / below cmd+alt+up / cmd+alt+down ctrl+alt+up / ctrl+alt+down
Add next occurrence cmd+d ctrl+d
Select all occurrences cmd+shift+l ctrl+shift+l
Back to one cursor escape escape

Lines#

Action macOS Windows/Linux
Duplicate lines down / up shift+alt+down / shift+alt+up shift+alt+down / shift+alt+up
Move lines down / up alt+down / alt+up alt+down / alt+up
Delete lines cmd+shift+k ctrl+shift+k
Toggle line comment cmd+/ ctrl+/

Folding#

Action macOS Windows/Linux
Fold / unfold at the cursor cmd+alt+[ / cmd+alt+] ctrl+alt+[ / ctrl+alt+]
Fold all / unfold all cmd+alt+0 / cmd+alt+shift+0 ctrl+alt+0 / ctrl+alt+shift+0
Fold or unfold a block click its chevron in the gutter click its chevron in the gutter

App#

Action macOS
Command palette cmd+shift+p
Go to file cmd+p
Go to symbol in file cmd+shift+o
Toggle sidebar cmd+b
Toggle agent cmd+l
Ask the agent about the selection cmd+alt+l
While the agent works: steer / send after the turn enter / alt+enter
Agent: pick a model / next favourite model ctrl+l / ctrl+p
Terminal ctrl+`
Settings cmd+,
Zoom in / out / reset cmd+= / cmd+- / cmd+0
Edit this page on GitHub
esc