💜Visual Studio Code Keyboard Shortcuts
34 essential shortcuts for Visual Studio Code
General
| Shortcut | Action |
|---|---|
| Ctrl+Shift+P/⌘⇧P | Open Command Palette |
| Ctrl+P/⌘P | Quick Open file by name |
| Ctrl+,/⌘, | Open Settings |
| Ctrl+`/⌃` | Toggle integrated terminal |
| Ctrl+B/⌘B | Toggle sidebar visibility |
| Ctrl+K Ctrl+S/⌘K ⌘S | Open keyboard shortcuts editor |
| Ctrl+\/⌘\ | Split editor right |
Navigation
| Shortcut | Action |
|---|---|
| Ctrl+Shift+E/⌘⇧E | Focus file explorer |
| Ctrl+Shift+F/⌘⇧F | Open search across files |
| Ctrl+Shift+G/⌃⇧G | Open source control panel |
| Ctrl+Shift+X/⌘⇧X | Open extensions panel |
| Ctrl+Tab | Switch between open editors |
| Ctrl+G/⌃G | Go to line number |
| Ctrl+Shift+O/⌘⇧O | Go to symbol in file |
| F12 | Go to definition |
| Alt+F12/⌥F12 | Peek definition inline |
Selection
| Shortcut | Action |
|---|---|
| Ctrl+D/⌘D | Select next occurrence of current word |
| Ctrl+Shift+L/⌘⇧L | Select all occurrences of current word |
| Alt+Click/⌥Click | Add cursor at click position |
Editing
| Shortcut | Action |
|---|---|
| Ctrl+Shift+K/⌘⇧K | Delete entire line |
| Alt+Up/⌥↑ | Move line up |
| Alt+Down/⌥↓ | Move line down |
| Shift+Alt+Down/⇧⌥↓ | Copy line down (duplicate) |
| Ctrl+Shift+[/⌘⌥[ | Fold code region |
| Ctrl+Shift+]/⌘⌥] | Unfold code region |
| Ctrl+//⌘/ | Toggle line comment |
| Shift+Alt+F/⇧⌥F | Format document |
| Ctrl+Shift+M/⌘⇧M | Open Problems panel |
Refactoring
| Shortcut | Action |
|---|---|
| F2 | Rename symbol across project |
| Ctrl+./⌘. | Quick Fix / Code Action |
Debugging
| Shortcut | Action |
|---|---|
| F5 | Start / continue debugging |
| F9 | Toggle breakpoint |
| F10 | Step over |
| F11 | Step into |
About Visual Studio Code Shortcuts
VS Code is a free, lightweight, and powerful source-code editor from Microsoft available on Windows, macOS, and Linux. It supports hundreds of programming languages through extensions, built-in Git integration, IntelliSense code completion, debugging, and an integrated terminal. VS Code's keyboard shortcuts are highly customizable and are essential for efficient code editing, allowing developers to navigate, refactor, and manage files without leaving the keyboard.
This reference covers 34 essential Visual Studio Code keyboard shortcuts organized across 6 categories: General, Navigation, Selection, and more. Each shortcut lists both macOS and Windows/Linux key combinations where applicable, making it easy to find the right key combo regardless of your operating system.
Learning keyboard shortcuts is one of the highest-leverage investments you can make in your daily workflow. Studies show that developers and designers who rely on keyboard shortcuts are measurably faster at common tasks. Rather than memorizing every shortcut at once, focus on the ones you use most frequently and gradually expand your repertoire.
Bookmark this page for quick reference whenever you need to look up a Visual Studio Code shortcut. The categorized layout makes it easy to find shortcuts by their function, whether you need navigation, editing, or specialized commands.