Skip to content

Keyboard shortcuts

A “keyboard shortcut” or “keybinding” is combination of keys on your keyboard which allows you to perform common actions such as saving a file, modifying the view, or copying a line of code. In the StackBlitz editor this set of shortcuts is predefined and, currently, non-customizable.

Choose your platform to see the full list of available shortcuts: Windows | MacOS | Linux.

Windows keybindings

Keybinding (Windows)Command
Ctrl SSave Project
Ctrl PGo To File …
Shift Alt FFormat Document
Ctrl BToggle Sidebar
Ctrl `Toggle Terminal
Ctrl JToggle Preview
Ctrl Shift EShow File Explorer
Ctrl Shift FShow Find In Files
Ctrl ,Show Settings
F1Show All Commands
Ctrl K + Ctrl 0Fold All
Ctrl K + Ctrl JUnfold All
Ctrl K + Ctrl /Fold All Block Comments
Ctrl K + Ctrl 1Fold Level 1
Ctrl K + Ctrl 2Fold Level 2
Ctrl K + Ctrl 3Fold Level 3
Ctrl K + Ctrl 4Fold Level 4
Ctrl K + Ctrl 5Fold Level 5
Ctrl K + Ctrl 6Fold Level 6
Ctrl K + Ctrl 7Fold Level 7
Ctrl K + Ctrl [Fold Recursively
Ctrl K + Ctrl ]Unfold Recursively
Ctrl 1Focus Editor Tab 1
Ctrl 2Focus Editor Tab 2
Ctrl 3Focus Editor Tab 3
Ctrl 4Focus Editor Tab 4
Ctrl 5Focus Editor Tab 5
Ctrl 6Focus Editor Tab 6
Ctrl 7Focus Editor Tab 7
Ctrl XCut line (empty selection)
Ctrl CCopy line (empty selection)
Alt / Alt Move line down/up
Shift Alt / Shift Alt Copy line down/up
Shift Ctrl KDelete line
Ctrl Enter / Shift Ctrl EnterInsert line below/above
Shift Ctrl \Jump to matching bracket
Ctrl / Ctrl Go to beginning/end of file
Ctrl K + Ctrl CAdd line comment
Ctrl K + Ctrl URemove line comment
Ctrl /Toggle line comment
Shift Alt AToggle block comment
Alt + clickInsert cursor
Alt Ctrl Insert cursor above
Alt Ctrl Insert cursor below
Ctrl UUndo last cursor operation
Shift Alt IInsert cursor at end of each line selected
Ctrl LSelect current line
Shift Ctrl LSelect all occurrences of current selection
Ctrl F2Select all occurrences of current word
Shift Ctrl / Expand / shrink selection
Shift Alt + drag mouseColumn (box) selection
Shift Alt Ctrl / Column (box) selection up/down
Shift Alt Ctrl / Column (box) selection left/right
Ctrl K F12Open Definition to the side
Shift F12Show References
F2Rename Symbol
Ctrl K + Ctrl XTrim trailing whitespace

MacOS keybindings

Keybinding (MacOS)Command
SSave Project
PGo To File …
FFormat Document
BToggle Sidebar
`Toggle Terminal
JToggle Preview
EShow File Explorer
FShow Find In Files
,Show Settings
(fn) F1Show All Commands
K + 0Fold All
K + JUnfold All
K + /Fold All Block Comments
K + 1Fold Level 1
K + 2Fold Level 2
K + 3Fold Level 3
K + 4Fold Level 4
K + 5Fold Level 5
K + 6Fold Level 6
K + 7Fold Level 7
K + [Fold Recursively
K + ]Unfold Recursively
1Focus Editor Tab 1
2Focus Editor Tab 2
3Focus Editor Tab 3
4Focus Editor Tab 4
5Focus Editor Tab 5
6Focus Editor Tab 6
7Focus Editor Tab 7
XCut line (empty selection)
CCopy line (empty selection)
/ Move line down/up
/ Copy line down/up
KDelete line
Enter / EnterInsert line below/above
\Jump to matching bracket
/ Go to beginning/end of file
K + CAdd line comment
K + URemove line comment
/Toggle line comment
AToggle block comment
+ clickInsert cursor
Insert cursor above
Insert cursor below
UUndo last cursor operation
IInsert cursor at end of each line selected
LSelect current line
LSelect all occurrences of current selection
(fn) F2Select all occurrences of current word
/ Expand / shrink selection
+ drag mouseColumn (box) selection
/ Column (box) selection up/down
/ Column (box) selection left/right
(fn) K F12Open Definition to the side
(fn) F12Show References
(fn) F2Rename Symbol
K + XTrim trailing whitespace

Linux keybindings

Keybinding (Linux)Command
Ctrl SSave Project
Ctrl PGo To File …
Shift Alt FFormat Document
Ctrl BToggle Sidebar
Ctrl `Toggle Terminal
Ctrl JToggle Preview
Ctrl Shift EShow File Explorer
Ctrl Shift FShow Find In Files
Ctrl ,Show Settings
F1Show All Commands
Ctrl K + Ctrl 0Fold All
Ctrl K + Ctrl JUnfold All
Ctrl K + Ctrl /Fold All Block Comments
Ctrl K + Ctrl 1Fold Level 1
Ctrl K + Ctrl 2Fold Level 2
Ctrl K + Ctrl 3Fold Level 3
Ctrl K + Ctrl 4Fold Level 4
Ctrl K + Ctrl 5Fold Level 5
Ctrl K + Ctrl 6Fold Level 6
Ctrl K + Ctrl 7Fold Level 7
Ctrl K + Ctrl [Fold Recursively
Ctrl K + Ctrl ]Unfold Recursively
Ctrl 1Focus Editor Tab 1
Ctrl 2Focus Editor Tab 2
Ctrl 3Focus Editor Tab 3
Ctrl 4Focus Editor Tab 4
Ctrl 5Focus Editor Tab 5
Ctrl 6Focus Editor Tab 6
Ctrl 7Focus Editor Tab 7
Ctrl XCut line (empty selection)
Ctrl CCopy line (empty selection)
Alt / Alt Move line down/up
Shift Alt / Shift Alt Copy line down/up
Shift Ctrl KDelete line
Ctrl Enter / Shift Ctrl EnterInsert line below/above
Shift Ctrl \Jump to matching bracket
Ctrl / Ctrl Go to beginning/end of file
Ctrl K + Ctrl CAdd line comment
Ctrl K + Ctrl URemove line comment
Ctrl /Toggle line comment
Shift Alt AToggle block comment
Alt + clickInsert cursor
Alt Ctrl Insert cursor above
Alt Ctrl Insert cursor below
Ctrl UUndo last cursor operation
Shift Alt IInsert cursor at end of each line selected
Ctrl LSelect current line
Shift Ctrl LSelect all occurrences of current selection
Ctrl F2Select all occurrences of current word
Shift Ctrl / Expand / shrink selection
Shift Alt + drag mouseColumn (box) selection
Shift Alt Ctrl / Column (box) selection up/down
Shift Alt Ctrl / Column (box) selection left/right
Ctrl K F12Open Definition to the side
Shift F12Show References
F2Rename Symbol
Ctrl K + Ctrl XTrim trailing whitespace