VS Code Shortcuts Reference

VS Code common shortcuts quick lookup, supports macOS / Windows.

General 6

DescriptionmacOS
Command Palette⇧⌘P
Quick Open File⌘P
New Window⇧⌘N
Close Editor⌘W
Open Settings⌘,
Keyboard Shortcuts⌘K ⌘S

Editing 15

DescriptionmacOS
Cut Line⌘X
Copy Line⌘C
Paste⌘V
Undo⌘Z
Redo⇧⌘Z
Add Next Selection⌘D
Select All Matches⇧⌘L
Toggle Line Comment⌘/
Toggle Block Comment⇧⌥A
Format Document⇧⌥F
Format Selection⌘K ⌘F
Move Line Up/Down⌥↑ / ⌥↓
Copy Line Up/Down⇧⌥↑ / ⇧⌥↓
Indent Line⌘]
Outdent Line⌘[

Navigation 9

DescriptionmacOS
Go to Line⌘G
Go to File⌘P
Go to Symbol⇧⌘O
Go to Workspace Symbol⌘T
Go to DefinitionF12
Peek Definition⌥F12
Find All References⇧F12
Go Back⌃-
Go Forward⌃⇧-

Search & Replace 4

DescriptionmacOS
Find⌘F
Replace⌥⌘F
Find in Files⇧⌘F
Replace in Files⇧⌘H

Multi-cursor 5

DescriptionmacOS
Add cursor⌥+点击
Add cursor above/below⌥⌘↑ / ↓
Select current line⌘L
Select All Matches⇧⌘L
Undo cursor operation⌘U

Terminal 3

DescriptionmacOS
Toggle Terminal⌃`
New Terminal⇧⌘`
Split terminal⌃⇧`

Debug 6

DescriptionmacOS
Start debuggingF5
Stop debugging⇧F5
Toggle BreakpointF9
Step OverF10
Step IntoF11
Step Out⇧F11