VS Code shortcuts
- 71 shortcuts
- 10 sections
- Development
- Also on: Windows, Linux
- Verified against official docs
Your answer helps keep this page right.
Do these shortcuts work for you?
VS Code runs almost everything through the Command Palette: a command without its own shortcut is still reachable by typing part of its name. Quick Open File opens any file in the project by name, and Add Next Match adds a cursor at the next occurrence of the selection, which replaces many small find-and-replace jobs.
Start with these
Tips for VS Code
- Learn the Command Palette ⇧⌘P first. It lists every command with its current shortcut next to it, so it teaches you shortcuts while you use it.
- With nothing selected, Cut line (empty selection) ⌘X and Copy line (empty selection) ⌘C work on the whole line. With Move Line Up ⌥↑ and Move Line Down ⌥↓ you can rearrange code without selecting anything.
- Go to Symbol ⇧⌘O lists the functions and classes in the current file, so you can jump to one without scrolling.
Jump to section
General27
| Action | Shortcut |
|---|---|
| Command Palette | |
| Quick Open File | |
| New Window | |
| Toggle Sidebar | |
| Toggle panel | |
| Explorer | |
| Search | |
| Source Control | |
| Run & Debug | |
| Extensions | |
| Split Editor | |
| Toggle Terminal | |
| Delete Line | |
| Move Line Up | |
| Move Line Down | |
| Copy Line Up | |
| Copy Line Down | |
| Add Next Match | |
| Toggle Comment | |
| Find | |
| Find and Replace | |
| Go to Symbol | |
| Go to Line | |
| Go to Definition | |
| Go to Matching Bracket | |
| Close window/instance | |
| User Settings |
Basic editing5
| Action | Shortcut |
|---|---|
| Cut line (empty selection) | |
| Copy line (empty selection) | |
| Jump to matching bracket | |
| Toggle block comment | |
| Toggle Word Wrap |
Rich language editing7
| Action | Shortcut |
|---|---|
| Trigger suggestion | |
| Trigger Parameter Hints | |
| Format Document | |
| Peek Definition | |
| Quick Fix | |
| Show References | |
| Rename Symbol |
Search and replace1
| Action | Shortcut |
|---|---|
| Select all occurrences of Find match |
Display7
| Action | Shortcut |
|---|---|
| Toggle full screen | |
| Toggle editor layout (horizontal/vertical) | |
| Show Source Control | |
| Replace in Files | |
| Toggle Search Details | |
| Show Output panel | |
| Open Markdown preview |
File management6
| Action | Shortcut |
|---|---|
| New File | |
| Open File... | |
| Save | |
| Save As | |
| Save All | |
| Reopen Closed Editor |
Debug4
| Action | Shortcut |
|---|---|
| Toggle Breakpoint | |
| Start/Continue | |
| Step Over | |
| Stop |
Integrated terminal1
| Action | Shortcut |
|---|---|
| Create new terminal |
Multi-cursor selection9
| Action | Shortcut |
|---|---|
| Insert Cursor Above | |
| Insert Cursor Below | |
| Undo last cursor operation | |
| Insert cursor at end of each line selected | |
| Select current line | |
| Select all occurrences of current selection | |
| Select all occurrences of current word | |
| Column (box) selection page up | |
| Column (box) selection page down |
Report a problem
GitHub is public. Email is private.
More Development shortcuts
Explore more macOS apps
Frequently Asked Questions
How many keyboard shortcuts does VS Code have on macOS?
VS Code has 71 keyboard shortcuts on macOS, organized into 10 sections: General, Basic editing, Rich language editing, Navigation, and more. This page lists all of them with searchable, organized shortcut tables.
Which VS Code shortcuts should I learn first?
Start with Command Palette (⇧⌘P), Quick Open File (⌘P), Toggle Terminal (⌃`), Add Next Match (⌘D), Toggle Comment (⌘/), Go to Definition (F12). The sections on this page list the rest.
Can I download VS Code shortcuts as a PDF?
Yes. Click the download button at the top of this page to generate a printable PDF cheat sheet with all 71 VS Code shortcuts. The PDF includes organized sections, keycap-style key labels, and space for your own notes.
Where is the official VS Code keyboard shortcuts documentation?
The official VS Code keyboard shortcuts documentation is available on their website. Every shortcut on this page is sourced from and verified against the official documentation to ensure accuracy.
Do these VS Code shortcuts work on all Mac keyboards?
Yes. These shortcuts work on all Mac keyboards, including MacBook built-in keyboards and external Apple keyboards. The modifier keys are Command (⌘), Option (⌥), Control (⌃), and Shift (⇧). On keyboards without a Function row, some F-key shortcuts may require holding the Fn key.
Maintained by Vladik Didyk
Access VS Code shortcuts from your menu bar
KeyShortcut detects the active app and shows its shortcuts instantly. Switch it on in Settings. No memorization needed.
