VS Code Shortcuts
-
Open the command palette:
Cmd+Shift+P
- Access various VS Code commands and features quickly. -
Toggle terminal:
Ctrl+~
- Open or close the integrated terminal. -
Quick open:
Cmd+P
- Quickly open any file in your project. -
Go to definition:
F12
- Navigate to the definition of the symbol under the cursor. -
Find references:
Shift+F12
- Find all references of the symbol under the cursor. -
Find all symbols in the file:
Cmd+Shift+O
- List all symbols (such as functions, classes, or variables) in the current file. -
Find in files:
Cmd+Shift+F
- Search for a specific text pattern throughout your project files. -
Find and replace in files:
Cmd+Shift+H
- Find and replace a specific text pattern throughout your project files. -
Toggle line comment:
Cmd+/
- Comment or uncomment the current line or selected lines. -
Toggle block comment:
Shift+Alt+A
- Comment or uncomment the current block (selected text) using block comments. -
Move line up/down:
Alt+Up/Down
- Move the current line or selected lines up or down. -
Duplicate line:
Shift+Alt+Up/Down
- Duplicate the current line or selected lines above or below. -
Go to line number:
Ctrl+G
- Quickly navigate to a specific line number. -
Go to previous/next error or warning:
F8
/Shift+F8
- Navigate through the errors and warnings in your code. -
Multi-cursor selection:
Cmd+Click
- Place multiple cursors in the editor for simultaneous editing. -
Expand/shrink selection:
Ctrl+Shift+Cmd+Right/Left
- Increase or decrease the current selection based on language semantics. -
Format document:
Shift+Alt+F
- Automatically format your code based on the configured formatter. -
Fold/unfold code:
Cmd+Alt+[
/Cmd+Alt+]
- Collapse or expand code blocks, functions, or objects. -
Open shortcuts menu
cmd+K cmd+s
Comments