VS Code
This cheatsheet covers the essential, productivity-boosting shortcuts for Visual Studio Code on Windows and Linux.
🔍 General & Interface
| Shortcut | Action |
|---|---|
| Ctrl + Shift + P or F1 | Open Command Palette (access all VS Code settings/commands) |
| Ctrl + P | Quick Open (quickly search and open files by name) |
| Ctrl + ` (Backtick) | Toggle integrated terminal |
| Ctrl + B | Toggle Side Bar visibility |
| Ctrl + Shift + E | Open Explorer view (file tree) |
| Ctrl + Shift + F | Open Global Search across all files |
| Ctrl + , (Comma) | Open User Settings |
📝 Editing & Text Manipulation
| Shortcut | Action |
|---|---|
| Ctrl + X | Cut line (if no selection, cuts the entire current line) |
| Ctrl + C | Copy line (if no selection, copies the entire current line) |
| Alt + ↓ / ↑ | Move current line down / up |
| Shift + Alt + ↓ / ↑ | Copy current line down / up |
| Ctrl + Shift + K | Delete entire current line |
| Ctrl + Enter | Insert a new line below without breaking current line |
| Ctrl + Shift + Enter | Insert a new line above |
| Ctrl + / | Toggle line comment |
| Shift + Alt + A | Toggle block comment |
🎯 Multi-Cursor & Selection
Multi-cursors let you edit multiple places in a file simultaneously.
| Shortcut | Action |
|---|---|
| Alt + Click | Insert cursor at the clicked position |
| Ctrl + Alt + ↓ / ↑ | Insert cursor directly below / above |
| Ctrl + D | Select the next occurrence of the current word |
| Ctrl + U | Undo the last cursor or selection change |
| Shift + Alt + I | Insert cursors at the end of every line in your current selection |
| Ctrl + L | Select current line |
🧭 Navigation
| Shortcut | Action |
|---|---|
| Ctrl + G | Go to a specific line number |
| Ctrl + Shift + O | Go to a specific symbol/function in the current file |
| F12 | Go to Definition (jump to where a variable/function is declared) |
| Peek Definition | Alt + F12 (view the definition inline without moving your cursor) |
| Ctrl + Shift + \ | Jump between matching brackets {}, [], () |
| Alt + ← / → | Go back / forward in your navigation history |
🗂️ Window & Editor Management
| Shortcut | Action |
|---|---|
| Ctrl + W | Close the active editor tab |
| Ctrl + \ | Split the editor layout vertically |
| Shift + Alt + 0 | Toggle vertical/horizontal editor layout |
| Ctrl + 1 / 2 / 3 | Focus into the 1st, 2nd, or 3rd editor group |
| Ctrl + Alt + → / ← | Move active editor to next/previous group |
| Ctrl + Shift + PgUp / PgDn | Move editor tab left / right within its group |
| Ctrl + K then ← / → | Move active editor group (rearrange layout) |
| Ctrl + Tab | Switch to the next most recently used open file |
💻 Integrated Terminal
| Shortcut | Action |
|---|---|
| Ctrl + ` (Backtick) | Toggle integrated terminal panel |
| Ctrl + Shift + ` | Create new terminal instance |
| Ctrl + Shift + 5 | Split terminal pane |
| Ctrl + PageUp / PageDown | Switch between terminal instances |
| Ctrl + Shift + \ | Focus terminal tabs view |
| Shift + PageUp / PageDown | Scroll page up / down in terminal history |
| Ctrl + ↑ / ↓ | Scroll line up / down in terminal history (when terminal is focused) |
| Ctrl + Shift + C | Open a new external terminal (OS system terminal) |
💡 Pro-Tip: If you are migrating to VS Code from another tool like IntelliJ, Eclipse, Vim, or Sublime Text, you don't have to relearn everything. Open the Command Palette (Ctrl + Shift + P), type
Keymaps, and select Install Keymap Extensions to find pre-made layouts matching your old editor.