Visual Studio Code Shortcuts
VS Code is a free, open-source code editor from Microsoft that supports multiple programming languages and platforms. It has a user-friendly interface, customizable preferences, and a large collection of extensions that enhance productivity and collaboration. It's a popular choice for developers, thanks to its speed, efficiency, and powerful features.
General
Show Command Palette
⇧
⌘
P
Quick Open, Go to File
⌘
P
New window/instance
⇧
⌘
N
Close window/instance
⌘
W
User Setttings
⌘
,
Keyboard Shortcuts
⌘
K
then⌘
S
Basic editing
Cut line (empty selection)
⌘
X
Copy line (empty selection)
⌘
C
Move line down/up
⌥
↓
or⌥
↑
Copy line down/up
⇧
⌥
↓
or⇧
⌥
↑
Delete line
⇧
⌘
K
Insert line below/above
⌘
↩
or⇧
⌘
↩
Jump to matching bracket
⇧
⌘
\
Indent/outdent line
⌘
]
or⌘
[
Go to beginning/end of line
HOME
orEND
Go to beginning/end of file
⌘
↑
or⌘
↓
Scroll line up/down
⌃
PGUP
or⌃
PGDN
Scroll page up/down
⌘
PGUP
or⌘
PGDN
Fold/unfold region
⌥
⌘
[
or⌥
⌘
]
Fold/unfold all subregions
⌘
K
⌘
[
or⌘
K
⌘
]
Fold/unfold all regions
⌘
K
⌘
0
or⌘
K
⌘
J
Add line comment
⌘
K
then⌘
C
Remove line comment
⌘
K
then⌘
U
Toggle line comment
⌘
/
Toggle block comment
⇧
⌥
A
Toggle word wrap
⌥
Z
Rich language editing
Trigger suggestion
⌃
␣
Trigger parameter hints
⇧
⌘
␣
Format document
⇧
⌥
F
Format selection
⌘
K
then⌘
F
Go to Definition
F12
Peek Definition
⌥
F12
Open Definition to the side
⌘
K
F12
Quick Fix
⌘
.
Show References
⇧
F12
Rename Symbol
F2
Trim trailing whitespace
⌘
K
⌘
X
Change file language
⌘
K
M
Navigation
Trigger suggestion
⌃
␣
Trigger parameter hints
⇧
⌘
␣
Format document
⇧
⌥
F
Format selection
⌘
K
⌘
F
Go to Definition
F12
Peek Definition
⌥
F12
Open Definition to the side
⌘
K
F12
Quick Fix
⌘
.
Show References
⇧
F12
Rename Symbol
F2
Trim trailing whitespace
⌘
K
then⌘
X
Change file language
⌘
K
M
Editor management
Close editor
⌘
W
Close folder
⌘
K
F
Split editor
⌘
\
Focus into 1st, 2nd, 3rd editor group
⌘
1
or⌘
2
or⌘
3
Focus into previous/next editor group
⌘
K
⌘
←
or⌘
K
⌘
→
Move editor left/right
⌘
K
⇧
⌘
←
or⌘
K
⇧
⌘
→
Move active editor group
⌘
K
←
or⌘
K
→
Search and replace
Find
⌘
F
Replace
⌥
⌘
F
Find next/previous
⌘
G
or⇧
⌘
G
Select all occurrences of Find match
⌥
↩
Add selection to next Find match
⌘
D
Move last selection to next Find match
⌘
K
⌘
D
Display
Toggle full screen
⌃
⌘
F
Toggle editor layout (horizontal/vertical)
⌥
⌘
0
Zoom in/out
⌘
=
or⇧
⌘
-
Toggle Sidebar visibility
⌘
B
Show Explorer / Toggle focus
⇧
⌘
E
Show Search
⇧
⌘
F
Show Source Control
⌃
⇧
G
Show Debug
⇧
⌘
D
Show Extensions
⇧
⌘
X
Replace in files
⇧
⌘
H
Toggle Search details
⇧
⌘
J
Show Output panel
⇧
⌘
U
Open Markdown preview
⇧
⌘
V
Open Markdown preview to the side
⌘
K
V
Zen Mode (Esc Esc to exit)
⌘
K
Z
File management
New File
⌘
N
Open File...
⌘
O
Save
⌘
S
Save As...
⇧
⌘
S
Save All
⌥
⌘
S
Close
⌘
W
Close All
⌘
K
⌘
W
Reopen closed editor
⇧
⌘
T
Keep preview mode editor open
⌘
K
↩
Open next / previous
⌃
⇥
or⌃
⇧
⇥
Copy path of active file
⌘
K
P
Reveal active file in Explorer
⌘
K
R
Show active file in new window/instance
⌘
K
O
Debug
Toggle breakpoint
F9
Start/Continue
F5
Step into/ out
F11
or⇧
F11
Step over
F10
Stop
⇧
F5
Show hover
⌘
K
⌘
I
Integrated terminal
Show integrated terminal
⌃
`
Create new terminal
⌃
⇧
`
Copy selection
⌘
C
Scroll up/down
⌘
↑
or↓
Scroll page up/down
PGUP
orPGDN
Scroll to top/bottom
⌘
HOME
orEND
Multi-cursor selection
Insert cursor
⌥
CLICK
Insert cursor above
⌥
⌘
↑
Insert cursor below
⌥
⌘
↓
Undo last cursor operation
⌘
U
Insert cursor at end of each line selected
⇧
⌥
I
Select current line
⌘
I
Select all occurrences of current selection
⇧
⌘
L
Select all occurrences of current word
⌘
F2
Expand / shrink selection
⌃
⇧
⌘
→
or←
Column (box) selection
⇧
⌥
DRAG
Column (box) selection up/down
⇧
⌥
⌘
↑
or↓
Column (box) selection left/right
⇧
⌥
⌘
←
or→
Column (box) selection page up
⇧
⌥
⌘
PGUP
Column (box) selection page down
⇧
⌥
⌘
PGDN