VS Code Shortcuts Reference
VS Code common shortcuts quick lookup, supports macOS / Windows.
General 6
| Description | macOS |
|---|---|
| Command Palette | ⇧⌘P |
| Quick Open File | ⌘P |
| New Window | ⇧⌘N |
| Close Editor | ⌘W |
| Open Settings | ⌘, |
| Keyboard Shortcuts | ⌘K ⌘S |
Editing 15
| Description | macOS |
|---|---|
| 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
| Description | macOS |
|---|---|
| Go to Line | ⌘G |
| 跳转到文件 | ⌘P |
| 跳转到Symbol | ⇧⌘O |
| 跳转到工作区Symbol | ⌘T |
| 跳Go to Definition | F12 |
| 查看定义(Preview) | ⌥F12 |
| Find All References | ⇧F12 |
| 后退 | ⌃- |
| 前进 | ⌃⇧- |
Search & Replace 4
| Description | macOS |
|---|---|
| Find | ⌘F |
| Replace | ⌥⌘F |
| 全局Find | ⇧⌘F |
| 全局Replace | ⇧⌘H |
Multi-cursor 5
| Description | macOS |
|---|---|
| Add光标 | ⌥+点击 |
| 上/下Add光标 | ⌥⌘↑ / ↓ |
| 选中当前行 | ⌘L |
| Select All Matches | ⇧⌘L |
| Undo光标操作 | ⌘U |
Terminal 3
| Description | macOS |
|---|---|
| Toggle Terminal | ⌃` |
| New Terminal | ⇧⌘` |
| 拆分Terminal | ⌃⇧` |
Debug 6
| Description | macOS |
|---|---|
| Start调试 | F5 |
| Stop调试 | ⇧F5 |
| Toggle Breakpoint | F9 |
| Step Over | F10 |
| Step Into | F11 |
| Step Out | ⇧F11 |