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
跳转到文件⌘P
跳转到Symbol⇧⌘O
跳转到工作区Symbol⌘T
跳Go to DefinitionF12
查看定义(Preview)⌥F12
Find All References⇧F12
后退⌃-
前进⌃⇧-

Search & Replace 4

DescriptionmacOS
Find⌘F
Replace⌥⌘F
全局Find⇧⌘F
全局Replace⇧⌘H

Multi-cursor 5

DescriptionmacOS
Add光标⌥+点击
上/下Add光标⌥⌘↑ / ↓
选中当前行⌘L
Select All Matches⇧⌘L
Undo光标操作⌘U

Terminal 3

DescriptionmacOS
Toggle Terminal⌃`
New Terminal⇧⌘`
拆分Terminal⌃⇧`

Debug 6

DescriptionmacOS
Start调试F5
Stop调试⇧F5
Toggle BreakpointF9
Step OverF10
Step IntoF11
Step Out⇧F11