VSCode Cheatsheet
·493 words·3 mins
Table of Contents
Example use of Better Comments extension for VSCode may help you creating more human-friendly comments in your code.
General #
| Shortcut | Description |
|---|---|
| Ctrl + Shift + P | Show Command Palette |
| Ctrl + P | Quick Open, Go to File… |
| Ctrl + Shift + N | New window/instance |
| Ctrl + Shift + W | Close window/instance |
| Ctrl + , | User Settings |
| Ctrl + K + Ctrl + S | Keyboard Shortcuts |
| Ctrl + ` | Open Integrated Terminal |
| Ctrl + Shift + ` | Create New Terminal |
Search and Replace #
| Shortcut | Description |
|---|---|
| Ctrl + F | Find |
| Ctrl + H | Replace |
| F3 | Find next |
| Shift + F3 | Find previous |
| Alt + Enter | Select all occurrences of Find match 🔥 |
| Ctrl + Shift + L | Change all occurrences of a word 🔥 |
| Ctrl + D | Add selection to next Find match |
| Ctrl + K + Ctrl + D | Move last selection to next Find match |
| Alt + C/R/W | Toggle case-sensitive/regex/whole word |
Rich Languages Editing #
| Shortcut | Description |
|---|---|
| Ctrl + Space | Trigger suggestion 🔥 |
| Ctrl + Shift + Space | Trigger parameter hints |
| Shift + Alt + F | Format document |
| Ctrl + K + Ctrl + F | Format selection |
| F12 | Go to Definition |
| Alt + F12 | Peek Definition |
| Ctrl + K + F12 | Open Definition to the side |
| Ctrl + . | Quick Fix |
| Shift + F12 | Show References |
| F2 | Rename Symbol |
| Ctrl + K + Ctrl + X | Trim trailing whitespace |
| Ctrl + K + M | Change file language |
Editor Shortcuts #
| Shortcut | Description |
|---|---|
| Ctrl + Enter | Insert Line Below |
| Ctrl + Backspace | Delete Word Left |
| Ctrl + Delete | Delete Word Right |
| Ctrl + Home | Go to Beginning of Line |
| Ctrl + End | Go to End of Line |
| Ctrl + PageUp | Scroll Page Up |
| Ctrl + PageDown | Scroll Page Down |
| Ctrl + Left | Move to Beginning of Word |
| Ctrl + Right | Move to End of Word |
| Ctrl + Up | Move to Beginning of File |
| Ctrl + Down | Move to End of File |
File Shortcuts #
| Shortcut | Description |
|---|---|
| Ctrl + N | New File |
| Ctrl + O | Open File |
| Ctrl + S | Save File |
| Ctrl + P | Quick Open |
| Ctrl + W | Close File |
| Ctrl + F4 | Close File |
| Ctrl + K / F | Close All Files |
| Ctrl + K / Ctrl + W | Close All Files |
| Ctrl + K / Ctrl + F | Format Document |
| Ctrl + K / Ctrl + O | Open Folder |
| Ctrl + K / Ctrl + T | Toggle Terminal |
| Ctrl + K / Ctrl + X | Close Terminal |
Debug Shortcuts #
| Shortcut | Description |
|---|---|
| F5 | Start Debugging |
| F9 | Toggle Breakpoint |
| F10 | Step Over |
| F11 | Step Into |
| Shift + F11 | Step Out |
Extension Shortcuts #
| Shortcut | Description |
|---|---|
| Ctrl + Shift + X | Open Extensions |
| Ctrl + Shift + P | Open Command Palette |
Git Shortcuts #
| Shortcut | Description |
|---|---|
| Ctrl + Shift + G | Open Source Control |
| Ctrl + Shift + P | Open Command Palette |
» Sources « #
Other resources: