Hotkeys and shortcuts for Visual Studio Code (Mac)

(Total 127)

↑   Shift + ⌘ Cmd + P then F1
General
F1 Show Command Palette
⌘ Cmd + P
Navigation
Go to file
↑   Shift + ⌘ Cmd + N
General
New window/instance
⌘ Cmd + W
File management
Close
⌘ Cmd + ,
General
User Settings
⌘ Cmd + K then ⌘ Cmd + S
General
Keyboard Shortcuts
⌘ Cmd + X
Basic editing
Cut line (empty selection)
⌘ Cmd + C
Integrated terminal
Copy selection
⌥ Option + ↑  ↓
Basic editing
Move line up/down
↑   Shift + ⌥ Option + ↑  ↓
Basic editing
Copy line up / down
⌘ Cmd + ⤶ Enter
Basic editing
Insert line below
↑   Shift + ⌘ Cmd + ⤶ Enter
Basic editing
Insert line above
↑   Shift + ⌘ Cmd + \
Basic editing
Jump to matching bracket
⌘ Cmd + ]
Basic editing
Indent/outdent line
⌘ Cmd + [
Basic editing
Indent/outdent line
Home
Basic editing
Go to beginning of line
End
Basic editing
Go to end of line
⌘ Cmd +
Basic editing
Go to beginning of file
⌘ Cmd +
Basic editing
Go to end of file
Ctrl + ↑  ↓
Basic editing
Scroll line up/down
Control + Page Up
Basic editing
Scroll page up
Control + Page Down
Basic editing
Scroll page down
⌥ Option + ⌘ Cmd + [
Basic editing
Fold (collapse) region
⌥ Option + ⌘ Cmd + ]
Basic editing
Unfold (uncollapse) region
⌘ Cmd + K then ⌘ Cmd + [
Basic editing
Fold (collapse) all subregions
⌘ Cmd + K then ⌘ Cmd + ]
Basic editing
Unfold (uncollapse) all subregions
⌘ Cmd + K then ⌘ Cmd + 0
Basic editing
Fold (collapse) all regions
⌘ Cmd + K then ⌘ Cmd + J
Basic editing
Unfold (uncollapse) all regions
⌘ Cmd + K then ⌘ Cmd + C
Basic editing
Add line comment
⌘ Cmd + K then ⌘ Cmd + U
Basic editing
Remove line comment
⌘ Cmd + /
Basic editing
Toggle line comment
↑   Shift + ⌥ Option + A
Basic editing
Toggle block comment
⌥ Option + Z
Basic editing
Toggle word wrap
⌘ Cmd + T
Navigation
Show all symbols
Control + G
Navigation
Go to line
↑   Shift + ⌘ Cmd + O
Navigation
Go to symbol
↑   Shift + ⌘ Cmd + M
Navigation
Show Problems panel
F8
Navigation
Go to next error or warning
↑   Shift + F8
Navigation
Go to previous error or warning
Ctrl + ↑   Shift + ⭾ Tab
Navigation
Navigate editor group history
Ctrl + -
Navigation
Go back
Ctrl + ↑   Shift + -
Navigation
Go forward
Ctrl + ↑   Shift + M
Navigation
Toggle Tab moves focus
⌘ Cmd + F
Search and replace
Find
⌥ Option + ⌘ Cmd + F
Search and replace
Replace
⌘ Cmd + G
Search and replace
Find next
↑   Shift + ⌘ Cmd + G
Search and replace
Find previous
⌥ Option + ⤶ Enter
Search and replace
Select all occurences of Find match
⌘ Cmd + D
Search and replace
Add selection to next Find match
⌘ Cmd + K then ⌘ Cmd + D
Search and replace
Move last selection to next Find match
⌥ Option + Mouse left click
Multi-cursor and selection
Insert cursor
⌥ Option + ⌘ Cmd + ↑  ↓
Multi-cursor and selection
Insert cursor above / below
⌘ Cmd + U
Multi-cursor and selection
Undo last cursor operation
↑   Shift + ⌥ Option + I
Multi-cursor and selection
Insert cursor at end of each line selected
⌘ Cmd + I
Multi-cursor and selection
Select current line
↑   Shift + ⌘ Cmd + L
Multi-cursor and selection
Select all occurrences of current selection
⌘ Cmd + F2
Multi-cursor and selection
Select all occurrences of current word
Ctrl + ↑   Shift + ⌘ Cmd +
Multi-cursor and selection
Expand selection
Ctrl + ↑   Shift + ⌘ Cmd +
Multi-cursor and selection
Shrink selection
↑   Shift + ⌥ Option + Mouse movement
Multi-cursor and selection
Column (box) selection
↑   Shift + ⌥ Option + ⌘ Cmd + ←  →
Multi-cursor and selection
Column (box) selection left/right
Shift + Option + Command + Page Up
Multi-cursor and selection
Column (box) selection page up
Shift + Option + Command + Page Down
Multi-cursor and selection
Column (box) selection page down
Ctrl + Space
Rich languages editing
Trigger suggestion
↑   Shift + ⌘ Cmd + Space
Rich languages editing
Trigger parameter hints
↑   Shift + ⌥ Option + F
Rich languages editing
Format document
⌘ Cmd + K then ⌘ Cmd + F
Rich languages editing
Format selection
F12
Rich languages editing
Go to Definition
⌥ Option + F12
Rich languages editing
Peek Definition
⌘ Cmd + K then F12
Rich languages editing
12 Open Definition to the side
⌘ Cmd + .
Rich languages editing
Quick Fix
↑   Shift + F12
Rich languages editing
Show References
F2
Rich languages editing
Rename Symbol
⌘ Cmd + K then ⌘ Cmd + X
Rich languages editing
Trim trailing whitespace
⌘ Cmd + K then M
Rich languages editing
M Change file language
⌘ Cmd + K then F
Editor management
F Close folder
⌘ Cmd + \
Editor management
Split editor
⌘ Cmd + 1
Editor management
Focus into first group
⌘ Cmd + 2
Editor management
Focus into second group
⌘ Cmd + 3
Editor management
Focus into third group
⌘ Cmd + K then ⌘ Cmd + ←  →
Editor management
Focus into previous/next editor group
⌘ Cmd + K then ↑   Shift + ⌘ Cmd +
Editor management
Move editor left
⌘ Cmd + K then ↑   Shift + ⌘ Cmd +
Editor management
Move editor right
⌘ Cmd + K then ←  →
Editor management
ht Move active editor group
⌘ Cmd + N
File management
New File
⌘ Cmd + O
File management
Open File
⌘ Cmd + S
File management
Save
↑   Shift + ⌘ Cmd + S
File management
Save As
⌥ Option + ⌘ Cmd + S
File management
Save All
⌘ Cmd + K then ⌘ Cmd + W
File management
Close All
Ctrl + ↑   Shift + T
File management
Reopen closed editor
⌘ Cmd + K then ⤶ Enter
File management
er Keep preview mode editor open
Control + ⭾ Tab
File management
Open next
Control + ↑   Shift + ⭾ Tab
File management
Open previous
⌘ Cmd + K then P
File management
P Copy path of active file
⌘ Cmd + K then R
File management
R Reveal active file in Explorer
⌘ Cmd + K then O
File management
O Show active file in new window/instance
Control + ⌘ Cmd + F
Display
Toggle full screen
⌥ Option + ⌘ Cmd + 1
Display
Toggle editor layout (horizontal/vertical)
⌘ Cmd + =
Display
Zoom in
↑   Shift + ⌘ Cmd + -
Display
Zoom out
⌘ Cmd + B
Display
Toggle Sidebar visibility
↑   Shift + ⌘ Cmd + E
Display
Show Explorer / Toggle focus
↑   Shift + ⌘ Cmd + F
Display
Show Search
Control + ↑   Shift + G
Display
Show Source Control
↑   Shift + ⌘ Cmd + D
Display
Show Debug
↑   Shift + ⌘ Cmd + X
Display
Show Extensions
↑   Shift + ⌘ Cmd + H
Display
Replace in files
↑   Shift + ⌘ Cmd + J
Display
Toggle Search details
↑   Shift + ⌘ Cmd + U
Display
Show Output panel
↑   Shift + ⌘ Cmd + V
Display
Open Markdown preview
⌘ Cmd + K then V
Display
V Open Markdown preview to the side
⌘ Cmd + K then Z
Display
Z Zen Mode (Esc Esc to exit)
F9
Debug
Toggle breakpoint
F5
Debug
Start/Continue
↑   Shift + F5
Debug
Stop
F11
Debug
Step into
↑   Shift + F11
Debug
Step out
F10
Debug
Step over
⌘ Cmd + K then ⌘ Cmd + I
Debug
Show hover
Control + `
Integrated terminal
Show integrated terminal
Control + ↑   Shift + `
Integrated terminal
Create new terminal
⌘ Cmd + ↑  ↓
Integrated terminal
Scroll up/down
Page Up
Integrated terminal
Scroll page up
Page Down
Integrated terminal
Scroll page down
⌘ Cmd + Home
Integrated terminal
Scroll to top
⌘ Cmd + End
Integrated terminal
Scroll to bottom