This page is a complete keyboard shortcut reference for VS Code on macOS, covering all 72 shortcuts organized into 11 sections. Whether you’re new to VS Code or looking to master advanced features, this cheat sheet has every key combination you need — from basic editing and navigation to app-specific power-user actions.
Keyboard shortcuts are the fastest way to work in VS Code. Every time you use a shortcut instead of reaching for the mouse, you save a few seconds — and those seconds compound into hours over weeks and months. Start with the shortcuts you use most (copy, paste, undo, save), then gradually add app-specific ones as they become relevant to your workflow. Bookmark this page or download the PDF cheat sheet for quick reference.
Using keyboard shortcuts in VS Code reduces context switching between keyboard and mouse, helping you maintain focus and work more efficiently. Research shows that shortcut-driven workflows can save up to 8 working days per year compared to menu-driven navigation. On macOS, most VS Code shortcuts follow standard conventions — once you learn the modifier key patterns, new shortcuts become intuitive.
Tips for Learning Shortcuts
- Practice one new VS Code shortcut each day. Muscle memory builds faster when you focus on a single combination at a time rather than trying to learn them all at once.
- Print or bookmark this page for quick reference while working in VS Code. Having shortcuts visible nearby helps bridge the gap between looking them up and recalling them from memory.
- Start with the shortcuts you use most. In VS Code, common actions like copy, paste, undo, and save are worth learning first since they apply across nearly every workflow.
General27
| Action | Shortcut |
|---|---|
| Command Palette | ⇧⌘P |
| Quick Open File | ⌘P |
| New Window | ⇧⌘N |
| Toggle Sidebar | ⌘B |
| shortcuts.vscode.togglePanel | ⌘J |
| Explorer | ⇧⌘E |
| Search | ⇧⌘F |
| Source Control | ⇧⌘G |
| Run & Debug | ⇧⌘D |
| Extensions | ⇧⌘X |
| Split Editor | ⌘\\ |
| Toggle Terminal | ⌃` |
| Delete Line | ⇧⌘K |
| Move Line Up | ⌥↑ |
| Move Line Down | ⌥↓ |
| Copy Line Up | ⌥⇧↑ |
| Copy Line Down | ⌥⇧↓ |
| Add Next Match | ⌘D |
| Toggle Comment | ⌘/ |
| Find | ⌘F |
| Find and Replace | ⌥⌘F |
| Go to Symbol | ⇧⌘O |
| Go to Line | ⌃G |
| Go to Definition | F12 |
| Go to Matching Bracket | ⇧⌘\\ |
| Close window/instance | ⌘W |
| User Settings | ⌘, |
Basic editing5
| Action | Shortcut |
|---|---|
| Cut line (empty selection) | ⌘X |
| Copy line (empty selection) | ⌘C |
| Jump to matching bracket | ⇧⌘\\ |
| Toggle block comment | ⌥⇧A |
| Toggle Word Wrap | ⌥Z |
Rich language editing7
| Action | Shortcut |
|---|---|
| Trigger suggestion | ⌃Space |
| Trigger Parameter Hints | ⇧⌘Space |
| Format Document | ⌥⇧F |
| Peek Definition | ⌥F12 |
| Quick Fix | ⌘. |
| Show References | ⇧F12 |
| Rename Symbol | F2 |
Editor management1
| Action | Shortcut |
|---|---|
| Split editor | ⌘\\ |
Search and replace1
| Action | Shortcut |
|---|---|
| Select all occurrences of Find match | ⌥↩ |
Display7
| Action | Shortcut |
|---|---|
| Toggle full screen | ⌃⌘F |
| Toggle editor layout (horizontal/vertical) | ⌥⌘0 |
| Show Source Control | ⌃⇧G |
| Replace in Files | ⇧⌘H |
| Toggle Search Details | ⇧⌘J |
| Show Output panel | ⇧⌘U |
| Open Markdown preview | ⇧⌘V |
File management6
| Action | Shortcut |
|---|---|
| New File | ⌘N |
| Open File... | ⌘O |
| Save | ⌘S |
| Save As | ⇧⌘S |
| Save All | ⌥⌘S |
| Reopen Closed Editor | ⇧⌘T |
Debug4
| Action | Shortcut |
|---|---|
| Toggle Breakpoint | F9 |
| Start/Continue | F5 |
| Step Over | F10 |
| Stop | ⇧F5 |
Integrated terminal1
| Action | Shortcut |
|---|---|
| Create new terminal | ⌃⇧` |
Multi-cursor selection9
| Action | Shortcut |
|---|---|
| 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 |
| Column (box) selection page up | ⌥⇧⌘Page Up |
| Column (box) selection page down | ⌥⇧⌘Page Down |
Frequently Asked Questions
Access VS Code shortcuts from your menu bar
KeyShortcut detects the active app and shows its shortcuts instantly. No memorization needed.