Skip to Content
How to use cdbxKeyboard Shortcuts

Keyboard Shortcuts

Tip: Press ⌘ K then ⌘ S (Ctrl K, Ctrl S) to open the full keyboard shortcut list without leaving the editor.

Command Bar

The command bar is the fastest way to navigate your app. Press the shortcut from anywhere in the editor — including when the code editor has focus.

ActionMacWindows / Linux
Go to file⌘ PCtrl P
Run editor command⌘ ⇧ PCtrl Shift P
Search in files⌘ ⇧ FCtrl Shift F
Go to symbol in editor⌘ ⇧ OCtrl Shift O
Close command barEscEsc

Programs

These work even while you’re typing in the code editor.

ActionMacWindows / Linux
Run⌘ ↵Ctrl ↵
Stop⌘ .Ctrl .
Stop and run again⌘ ↵ while runningCtrl ↵ while running
Check (prep course)⌘ ⇧ ↵Ctrl Shift ↵
Next / previous day file (Advent of Code)⌘ ⌥ ] / ⌘ ⌥ [Ctrl Alt ] / Ctrl Alt [
Show or hide the puzzle (Advent of Code)⌘ ⌥ PCtrl Alt P
Show or hide Output⌘ JCtrl J
Show or hide the sidebar⌘ BCtrl B
Keyboard shortcuts⌘ K ⌘ SCtrl K Ctrl S

Mode switching inside the bar

You can switch modes by typing a prefix character — no need to close and reopen.

PrefixModeExample
(none)Go to fileApp
>Editor commands> Toggle Sidebar
#Search in files# useState

Use ↑ ↓ to navigate results, Enter to open, Esc to close. Clicking a result with the mouse works too.

Settings panels

Open them from the settings menu (⚙) in the editor header, or by name in the command bar (⌘ ⇧ P): Editor Preferences, Editor Settings, Keyboard Shortcuts, Power Mode, App Actions and AI Settings.

File tree

Click anywhere in the file tree panel to give it keyboard focus, then use these shortcuts.

ActionShortcut
New fileN
New folderShift + N
Collapse all foldersCollapse All button in tree header

Tab bar

Right-click any open tab for a context menu with:

ActionDescription
CloseClose this tab
Close OthersClose every tab except this one
Close to the RightClose all tabs to the right of this one
Reveal in File TreeScroll the file tree to this file and highlight it
Copy Relative PathCopy the @/src/… path to the clipboard

The overflow chevron (⌄) appears at the right edge of the tab bar when there are more open tabs than fit — click it to see and switch to any open file.

Code editor

ActionMacWindows / Linux
Comment selection⌘ K CCtrl K C
Uncomment selection⌘ K UCtrl K U
Toggle line comment⌘ /Ctrl /
Find⌘ FCtrl F
Find and replace⌘ HCtrl H
Go to lineCtrl GCtrl G
Rename symbol (all files)fn F2 (or F2 with standard fn keys)F2
Format document⇧ ⌥ FShift Alt F
Multi-cursor⌥ ClickAlt Click
Select all occurrences⌘ ⇧ LCtrl Shift L
Move line up / down⌥ ↑ / ↓Alt ↑ / ↓
Duplicate line⇧ ⌥ ↓Shift Alt ↓
Delete line⌘ ⇧ KCtrl Shift K
Fold region⌘ ⌥ [ (in Advent of Code programs: previous day)Ctrl Shift [
Unfold region⌘ ⌥ ] (in Advent of Code programs: next day)Ctrl Shift ]
Trigger autocompleteCtrl SpaceCtrl Space

AI Chat

ActionHow
Send messageEnter
New line in messageShift + Enter
New chatClick the + button in the chat header
Fix errorClick Fix error when a build/runtime error appears
Open AI SettingsSettings menu (⚙) → AI → AI Settings Panel
Last updated on