VS Code Shortcuts for Developers: The Complete Cheatsheet
By Darsh Jariwala
VS Code has over 1,000 commands, but you only need about 30 to work efficiently. This guide covers the shortcuts that save real time — editing, navigation, debugging, Git, and terminal integration.
Integrated Terminal: Ctrl+` — Toggle without leaving editor
Command + Click: Go to definition with mouse
Essential Shortcuts
Command Palette & Navigation
Shortcut
Windows/Linux
macOS
Action
Command Palette
Ctrl+Shift+P
Cmd+Shift+P
Access all commands
Quick Open File
Ctrl+P
Cmd+P
Open file by name
Go to Symbol
Ctrl+Shift+O
Cmd+Shift+O
Jump to function/class
Go to Line
Ctrl+G
Cmd+G
Jump to line number
Go to Definition
F12
F12
Jump to symbol
Go Back/Forward
Alt+←/→
Ctrl+- / Cmd+Shift+-
Navigate history
Show Explorer
Ctrl+Shift+E
Cmd+Shift+E
Focus file explorer
Show Search
Ctrl+Shift+F
Cmd+Shift+F
Global search
Show Git
Ctrl+Shift+G
Ctrl+Shift+G
Source control panel
Show Extensions
Ctrl+Shift+X
Cmd+Shift+X
Extensions marketplace
Editing
Shortcut
Windows/Linux
macOS
Action
Multi-cursor Select
Ctrl+D
Cmd+D
Select next occurrence
Select All Occurrences
Ctrl+Shift+L
Cmd+Shift+L
Edit all at once
Multi-cursor (click)
Alt+Click
Option+Click
Place cursor anywhere
Move Line Up/Down
Alt+↑/↓
Option+↑/↓
Move line
Copy Line Up/Down
Shift+Alt+↑/↓
Shift+Option+↑/↓
Duplicate line
Delete Line
Ctrl+Shift+K
Cmd+Shift+K
Remove current line
Insert Line Below
Ctrl+Enter
Cmd+Enter
New line, stay put
Insert Line Above
Ctrl+Shift+Enter
Cmd+Shift+Enter
New line above
Toggle Comment
Ctrl+/
Cmd+/
Comment/uncomment line
Format Document
Shift+Alt+F
Shift+Option+F
Auto-format
Format Selection
Ctrl+K Ctrl+F
Cmd+K Cmd+F
Format selected
Fold/Unfold
Ctrl+Shift+[ / ]
Cmd+Option+[ / ]
Collapse code
Toggle Word Wrap
Alt+Z
Option+Z
Wrap long lines
Code Navigation
Shortcut
Windows/Linux
macOS
Action
Peek Definition
Alt+F12
Option+F12
Inline definition
Find All References
Shift+F12
Shift+F12
List references
Rename Symbol
F2
F2
Refactor rename
Show Problems
Ctrl+Shift+M
Cmd+Shift+M
Error list
Next Error/Warning
F8
F8
Jump to next issue
Previous Error
Shift+F8
Shift+F8
Jump to previous
Trigger Suggest
Ctrl+Space
Ctrl+Space
Show autocomplete
Trigger Parameter Hint
Ctrl+Shift+Space
Cmd+Shift+Space
Function params
Show Hover
Ctrl+K Ctrl+I
Cmd+K Cmd+I
Show info tooltip
Go to Bracket
Ctrl+Shift+\
Cmd+Shift+\
Jump to matching bracket
Selection & Search
Shortcut
Windows/Linux
macOS
Action
Find
Ctrl+F
Cmd+F
Current file search
Replace
Ctrl+H
Cmd+H
Find and replace
Find in Files
Ctrl+Shift+F
Cmd+Shift+F
Global search
Replace in Files
Ctrl+Shift+H
Cmd+Shift+H
Global replace
Select Line
Ctrl+L
Cmd+L
Select entire line
Expand Selection
Shift+Alt+→
Ctrl+Shift+→
Smart expand
Shrink Selection
Shift+Alt+←
Ctrl+Shift+←
Smart shrink
Terminal Integration
Shortcut
Windows/Linux
macOS
Action
Toggle Terminal
Ctrl+`
Ctrl+`
Show/hide terminal
New Terminal
Ctrl+Shift+
Ctrl+Shift+
Create new terminal
Focus Terminal
`Ctrl+“
`Ctrl+“
Switch to terminal
Focus Editor
Ctrl+1
Cmd+1
Switch to editor
Run Selected
Ctrl+Shift+Enter
Cmd+Shift+Enter
Run in terminal
Kill Terminal
Ctrl+Shift+K
Cmd+Shift+K
Close terminal
Debugging
Shortcut
Windows/Linux
macOS
Action
Start Debugging
F5
F5
Run with debugger
Run Without Debug
Ctrl+F5
Cmd+F5
Run without attach
Stop Debugging
Shift+F5
Shift+F5
Stop session
Toggle Breakpoint
F9
F9
Add/remove breakpoint
Step Over
F10
F10
Next line
Step Into
F11
F11
Enter function
Step Out
Shift+F11
Shift+F11
Exit function
Continue
F5
F5
Resume execution
Restart
Ctrl+Shift+F5
Cmd+Shift+F5
Restart debugging
Show Debug Console
Ctrl+Shift+Y
Cmd+Shift+Y
Debug output
Git Integration
Shortcut
Windows/Linux
macOS
Action
Open Source Control
Ctrl+Shift+G
Ctrl+Shift+G
Git panel
Stage Selected
Ctrl+Enter
Cmd+Enter
Stage changes
Stage All
Ctrl+Shift+Enter
Cmd+Shift+Enter
Stage everything
Commit
Ctrl+Enter
Cmd+Enter
Commit staged
Commit All
Ctrl+Shift+Enter
Cmd+Shift+Enter
Commit all
Pull
N/A
N/A
Use command palette
Push
N/A
N/A
Use command palette
Open Changes
Ctrl+K Ctrl+D
Cmd+K Cmd+D
Show diff
Show Git Log
N/A
N/A
Use GitLens extension
Window & View Management
Shortcut
Windows/Linux
macOS
Action
Toggle Sidebar
Ctrl+B
Cmd+B
Show/hide explorer
Toggle Panel
Ctrl+J
Cmd+J
Show/hide bottom panel
Toggle Terminal
Ctrl+`
Ctrl+`
Show/hide terminal
Split Editor
Ctrl+\
Cmd+\
Create new editor group
Focus Next Group
Ctrl+1/2/3
Cmd+1/2/3
Switch editor groups
Close Editor
Ctrl+W
Cmd+W
Close current tab
Close All
Ctrl+K Ctrl+W
Cmd+K Cmd+W
Close all tabs
Reopen Closed
Ctrl+Shift+T
Cmd+Shift+T
Restore closed tab
Full Screen
F11
Ctrl+Cmd+F
Toggle fullscreen
Zen Mode
Ctrl+K Z
Cmd+K Z
Distraction-free
Pro Tips
Quick File Navigation
plaintext
Ctrl+P (or Cmd+P on Mac)> Type filename (fuzzy match)> Use @ to go to symbol: file@function> Use : to go to line: file:42> Use > to run command
Examples:
user → finds UserController.ts
user@create → opens UserController.ts at create function
user:25 → opens at line 25
Multi-Cursor Magic
plaintext
1. Alt+Click (Option+Click) → place cursors anywhere2. Ctrl+D (Cmd+D) → select next occurrence3. Ctrl+Shift+L (Cmd+Shift+L) → select all occurrences4. Ctrl+Alt+↓ (Cmd+Option+↓) → add cursor to next line
Emmet Abbreviations
Built into VS Code for HTML/CSS:
plaintext
! → HTML5 boilerplatediv.container → <div class="container"></div>ul>li*5 → 5 list itemsheader+main+footer → 3 sibling elements
Type abbreviation then press Tab.
Snippets
plaintext
Create custom snippets:File → Preferences → User SnippetsExample (JavaScript):"console.log": { "prefix": "clog", "body": "console.log('$1:', $1);", "description": "Log with label"}
Type clog, press Tab, enter variable name.
Custom Keybindings
Add to keybindings.json
Ctrl+K Ctrl+S → Open Keyboard Shortcuts → Click icon to open JSON: