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 |
| Go to File | ⌘P |
| Go to Symbol | ⇧⌘O |
| Go to Workspace Symbol | ⌘T |
| Go to Definition | F12 |
| Peek Definition | ⌥F12 |
| Find All References | ⇧F12 |
| Go Back | ⌃- |
| Go Forward | ⌃⇧- |
Search & Replace 4
| Description | macOS |
|---|---|
| Find | ⌘F |
| Replace | ⌥⌘F |
| Find in Files | ⇧⌘F |
| Replace in Files | ⇧⌘H |
Multi-cursor 5
| Description | macOS |
|---|---|
| Add cursor | ⌥+点击 |
| Add cursor above/below | ⌥⌘↑ / ↓ |
| Select current line | ⌘L |
| Select All Matches | ⇧⌘L |
| Undo cursor operation | ⌘U |
Terminal 3
| Description | macOS |
|---|---|
| Toggle Terminal | ⌃` |
| New Terminal | ⇧⌘` |
| Split terminal | ⌃⇧` |
Debug 6
| Description | macOS |
|---|---|
| Start debugging | F5 |
| Stop debugging | ⇧F5 |
| Toggle Breakpoint | F9 |
| Step Over | F10 |
| Step Into | F11 |
| Step Out | ⇧F11 |