VSCode Basic Cheatsheet
Navigation
Description | Linux | Windows | Mac |
---|---|---|---|
Open Command Palette |
Ctrl+Shift+P |
Ctrl+Shift+P |
Cmd+Shift+P |
Open File |
Ctrl+P |
Ctrl+P |
Cmd+P |
Toggle Sidebar |
Ctrl+B |
Ctrl+B |
Cmd+B |
Close Editor |
Ctrl+W |
Ctrl+W |
Cmd+W |
Switch between Tabs |
Ctrl+Tab |
Ctrl+Tab |
Cmd+Tab |
Split Editor |
Ctrl+\ |
Ctrl+\ |
Cmd+\ |
Navigate between Editor Groups |
Ctrl+1, Ctrl+2… |
Ctrl+1, Ctrl+2… |
Cmd+1, Cmd+2… |
Navigate Forward |
Ctrl+Alt+→ |
Alt+→ |
Option+→ |
Navigate Backward |
Ctrl+Alt+← |
Alt+← |
Option+← |
Go to Symbol |
Ctrl+Shift+O |
Ctrl+Shift+O |
Cmd+Shift+O |
Go to Definition |
F12 |
F12 |
F12 |
Editing
Description | Linux | Windows | Mac |
---|---|---|---|
Copy Line Up/Down |
Shift+Alt+↑/↓ |
Shift+Alt+↑/↓ |
Shift+Option+↑/↓ |
Move Line Up/Down |
Alt+↑/↓ |
Alt+↑/↓ |
Option+↑/↓ |
Duplicate Line |
Shift+Alt+↓ |
Shift+Alt+↓ |
Option+Shift+↓ |
Delete Line |
Ctrl+Shift+K |
Ctrl+Shift+K |
Cmd+Shift+K |
Add Line Comment |
Ctrl+/ |
Ctrl+/ |
Cmd+/ |
Add Block Comment |
Shift+Alt+A |
Shift+Alt+A |
Shift+Option+A |
Format Document |
Shift+Alt+F |
Shift+Alt+F |
Shift+Option+F |
Rename Symbol |
F2 |
F2 |
F2 |
Find |
Ctrl+F |
Ctrl+F |
Cmd+F |
Find and Replace |
Ctrl+H |
Ctrl+H |
Cmd+Option+F |
Select All Occurrences |
Ctrl+Shift+L |
Ctrl+Shift+L |
Cmd+Shift+L, Cmd+D (for multiple selections) |
File Management
Description | Linux | Windows | Mac |
---|---|---|---|
New File |
Ctrl+N |
Ctrl+N |
Cmd+N |
Open File |
Ctrl+O |
Ctrl+O |
Cmd+O |
Save File |
Ctrl+S |
Ctrl+S |
Cmd+S |
Save All |
Ctrl+K, S |
Ctrl+K, S |
Cmd+Option+S |
Close File |
Ctrl+W |
Ctrl+W |
Cmd+W |
Reopen Closed File |
Ctrl+Shift+T |
Ctrl+Shift+T |
Cmd+Shift+T |
Terminal
Description | Linux | Windows | Mac |
---|---|---|---|
Open Integrated Terminal |
Ctrl+` |
Ctrl+` |
Cmd+` |
Create New Terminal |
Ctrl+Shift+` |
Ctrl+Shift+` |
Cmd+Shift+` |
Toggle Terminal |
Ctrl+` |
Ctrl+` |
Cmd+` |
Split Terminal |
Ctrl+Shift+5 |
Ctrl+Shift+5 |
Cmd+Shift+5 |
Multi-cursor and Selection
Description | Linux | Windows | Mac |
---|---|---|---|
Insert cursor |
Alt+Click |
Alt+Click |
Option+Click |
Insert cursor above / below |
Ctrl+Alt+↑ / Ctrl+Alt+↓ |
Ctrl+Alt+↑ / Ctrl+Alt+↓ |
Cmd+Option+↑ / Cmd+Option+↓ |
Undo last cursor operation |
Ctrl+U |
Ctrl+U |
Cmd+U |
Insert cursor at end of each line selected |
Shift+Alt+I |
Shift+Alt+I |
Cmd+Option+I |
Select current line |
Ctrl+L |
Ctrl+L |
Cmd+L |
Select all occurrences of current selection |
Ctrl+Shift+L |
Ctrl+Shift+L |
Cmd+Shift+L |
Select all occurrences of current word |
Ctrl+F2 |
Ctrl+F2 |
Cmd+F2 |
Expand selection |
Shift+Alt+→ |
Shift+Alt+→ |
Cmd+Option+→ |
Shrink selection |
Shift+Alt+← |
Shift+Alt+← |
Cmd+Option+← |
Column (box) selection (with mouse drag) |
Shift+Alt + drag mouse |
Shift+Alt + drag mouse |
Cmd+Option + drag mouse |
Column (box) selection (with arrow key) |
Ctrl+Shift+Alt + arrow key |
Ctrl+Shift+Alt + arrow key |
Cmd+Shift+Option + arrow key |
Column (box) selection page up/down |
Ctrl+Shift+Alt+PgUp/PgDn |
Ctrl+Shift+Alt+PgUp/PgDn |
Cmd+Shift+Option+PgUp/PgDn |
Search
Description | Linux | Windows | Mac |
---|---|---|---|
Search Files |
Ctrl+Shift+F |
Ctrl+Shift+F |
Cmd+Shift+F |
Search and Replace in Files |
Ctrl+Shift+H |
Ctrl+Shift+H |
Cmd+Shift+H |