Developer ToolsVS Code
toolsvscodeReferenceBeginner
VS Code: Essential Keyboard Shortcuts
Complete cheatsheet of the most important productivity keyboard shortcuts in Visual Studio Code for macOS, Windows, and Linux.
Verified: 2026-09-30
Tested on:vscode 1.93.x
Platforms:
linuxmacoswindows
#vscode#shortcuts#productivity#keybindings
Mastering editor keybindings drastically accelerates coding, file navigation, multi-cursor editing, and refactoring.
Essential General Navigation
| Action | macOS | Windows / Linux |
|---|---|---|
| Command Palette | Cmd + Shift + P | Ctrl + Shift + P |
| Quick Open File | Cmd + P | Ctrl + P |
| Global Search across Files | Cmd + Shift + F | Ctrl + Shift + F |
| Toggle Integrated Terminal | Ctrl + ` | Ctrl + ` |
| Toggle Primary Sidebar | Cmd + B | Ctrl + B |
| Split Editor Window | Cmd + </kbd> | Ctrl + </kbd> |
| Close Active Editor | Cmd + W | Ctrl + W |
Code Editing & Multi-Cursor
| Action | macOS | Windows / Linux |
|---|---|---|
| Add Next Match to Selection | Cmd + D | Ctrl + D |
| Select All Occurrences | Cmd + Shift + L | Ctrl + Shift + L |
| Insert Cursor Above / Below | Cmd + Option + ↑/↓ | Ctrl + Alt + ↑/↓ |
| Move Line Up / Down | Option + ↑/↓ | Alt + ↑/↓ |
| Duplicate Line Up / Down | Shift + Option + ↑/↓ | Shift + Alt + ↑/↓ |
| Delete Entire Line | Cmd + Shift + K | Ctrl + Shift + K |
| Toggle Line Comment | Cmd + / | Ctrl + / |
Code Navigation & Refactoring
| Action | macOS | Windows / Linux |
|---|---|---|
| Go to Definition | F12 (or Cmd + Click) | F12 (or Ctrl + Click) |
| Peek Definition | Option + F12 | Alt + F12 |
| Find All References | Shift + F12 | Shift + F12 |
| Rename Symbol (F2 Refactor) | F2 | F2 |
| Format Document | Shift + Option + F | Shift + Alt + F |
| Quick Fix / Code Action | Cmd + . | Ctrl + . |
Customizing Keyboard Shortcuts
Open keybindings JSON editor:
- Open Command Palette $\rightarrow$
Preferences: Open Keyboard Shortcuts (JSON)
[
{
"key": "cmd+shift+r",
"command": "workbench.action.reloadWindow"
}
]Related Guides
VS Code: Settings & Configuration (`settings.json`)
Complete guide to VS Code settings, user vs workspace settings, format on save, font ligatures, minimap customization, and recommended developer settings.
VS Code: Command Palette & Quick Open
Complete guide to using the Command Palette (>), Quick Open (Ctrl/Cmd+P), symbol search (@), and file navigation in VS Code.