Codelet logoCodelet

Keyboard shortcuts

Every shortcut the workbench and the editor bind, grouped by area

Mod is Cmd on macOS and Ctrl everywhere else — every table below uses it that way. A shortcut fires wherever the workbench has focus; where a table says "editor" or "explorer", the caret or the row focus has to be inside that pane first.

#General and palette

ShortcutAction
Mod-POpen the palette on files
Mod-K or Mod-Shift-POpen the palette on commands
Mod-Shift-OOpen the palette on symbols in the file showing
Mod-SSave the file showing
Mod-`Toggle the panel
EscapeClose the palette, a quick pick, or a menu

Toggle Sidebar and Toggle Secondary Side Bar have no shortcut — run them from the command palette. On a narrow screen there's no room in the activity bar for anything else, so it carries a Commands button that opens the palette directly instead.

Read more in Guide > Navigation.

#File explorer

Arrow keys move the focused row; typing a character opens the filter field with that character already in it, the way VS Code's type-to-filter does.

ShortcutAction
ArrowUp/ArrowDownMove the focused row
ArrowRightOpen a file, expand a folder, or step into an open one's first child
ArrowLeftCollapse an open folder, or step out to its parent
Home/EndJump to the first or last visible row
EnterRename the focused row
Mod-XCut the focused row
Mod-CCopy the focused row
Mod-VPaste into the focused row's directory
EscapeClear the filter, or cancel a rename
Read more in Guide > Files.

#Tabs and editors

ShortcutAction
Mod-SSave the active editor's file

#Editing

CodeMirror's own keymap covers the rest of text editing — arrow keys, Backspace/Delete, Mod-A select all, word and line navigation and so on. These are the ones worth knowing beyond that:

ShortcutAction
Mod-ZUndo
Mod-Y (Mod-Shift-Z on Mac)Redo
Tab / Shift-TabIndent / outdent
Mod-] / Mod-[Indent / outdent
Mod-/Toggle line comment
Alt-ArrowUp / Alt-ArrowDownMove the line up / down
Shift-Alt-ArrowUp / Shift-Alt-ArrowDownCopy the line up / down
Mod-Alt-ArrowUp / Mod-Alt-ArrowDownAdd a cursor above / below
Mod-DSelect the word, then each next occurrence of it
Shift-Mod-KDelete the line
BackspaceDeletes a bracket pair together when the caret sits between one it closed

A language provider — a language server, for instance — adds these on top, where one is registered for the file:

ShortcutAction
F12 or Mod-clickGo to definition
F2Rename symbol
Shift-Alt-FFormat document
Mod-.Quick fix
Shift-Alt-ArrowRight / Shift-Alt-ArrowLeftExpand / shrink the selection by syntax
Read more in Guide > Navigation.

#Find

ShortcutAction
Mod-FOpen find (seeded with the selection)
Mod-H (Mod-Alt-F on Mac)Open find and replace
Enter / Shift-EnterNext / previous match, from the find field
Mod-Alt-EnterReplace all, from the find field
EscapeClose find

#Panel and side bars

ShortcutAction
Mod-`Toggle the panel

The sidebar, the secondary side bar and the theme picker have no bound key — reach them from their activity bar icons or the command palette.