Essential VS Code shortcuts for editing, navigation, debugging, and the integrated terminal
Access any command by name
Mac: Cmd+Shift+P
Win: Ctrl+Shift+POpen a file by name instantly
Mac: Cmd+P
Win: Ctrl+POpen user or workspace settings
Mac: Cmd+,
Win: Ctrl+,Open or focus the integrated terminal
Mac: Ctrl+`
Win: Ctrl+`Close the active editor tab
Mac: Cmd+W
Win: Ctrl+WAdd cursors to edit multiple locations at once
Mac: Option+Click (add cursor)
Cmd+Option+Down/Up (add cursor below/above)
Win: Alt+Click
Ctrl+Alt+Down/UpAdd the next match to selection (multi-cursor rename)
Mac: Cmd+D
Win: Ctrl+DReorder lines without cut/paste
Mac: Option+Up / Option+Down
Win: Alt+Up / Alt+DownCopy the current line below
Mac: Option+Shift+Down
Win: Shift+Alt+DownComment or uncomment selected lines
Mac: Cmd+/
Win: Ctrl+/Auto-format the entire file
Mac: Option+Shift+F
Win: Shift+Alt+FExpand selection to next scope level
Mac: Cmd+Shift+Right
Win: Shift+Alt+RightJump to where a symbol is defined
Mac/Win: F12
Mac: Cmd+ClickPreview definition inline without leaving current file
Mac: Option+F12
Win: Alt+F12Search for a symbol in the current file
Mac: Cmd+Shift+O
Win: Ctrl+Shift+OJump to a specific line number
Mac: Ctrl+G
Win: Ctrl+GNavigate the symbol path in the breadcrumbs bar
Mac/Win: Focus breadcrumbs with Ctrl+Shift+.Search within the current file
Mac: Cmd+F
Win: Ctrl+FFind and replace within the current file
Mac: Cmd+H
Win: Ctrl+HSearch the entire workspace
Mac: Cmd+Shift+F
Win: Ctrl+Shift+FSplit the editor to the right
Mac: Cmd+\
Win: Ctrl+\Move focus between split editor groups
Mac/Win: Ctrl+1, Ctrl+2, Ctrl+3Cycle through open editor tabs
Mac: Ctrl+Tab (next), Ctrl+Shift+Tab (prev)
Win: Ctrl+TabStart debugging session or continue execution
Mac/Win: F5Step through code during debugging
Step Over: F10
Step Into: F11
Step Out: Shift+F11Add or remove a breakpoint on current line
Mac/Win: F9Rename multiple occurrences of a variable efficiently
1. Place cursor on the variable name
2. Press Cmd+D (Mac) / Ctrl+D (Win) to select next match
3. Keep pressing Cmd+D to add more matches
4. Type the new name — all selections update simultaneously
Tip: Press Cmd+K then Cmd+D to skip a match
Press Escape to exit multi-cursor modeRename a symbol across all files in the workspace
1. Place cursor on the symbol (variable, function, class)
2. Press F2 to open the rename input
3. Type the new name
4. Press Enter — VS Code updates all references across files
This respects TypeScript/JavaScript imports and exports.
Works in most language extensions (Python, Go, etc.)Navigate between recently opened files quickly
Cmd+P (Mac) / Ctrl+P (Win) — Quick Open
- Type a filename fragment to filter: "userhook" -> useUserHook.ts
- Press Enter to open, or Right Arrow to open in split view
Ctrl+Tab — cycle through recently used editor tabs
Ctrl+- (Mac) — navigate back (like browser back button)
Ctrl+Shift+- (Mac) — navigate forwardLearn Cmd+Shift+P first — you can discover and run any command from there
Customize keybindings via Cmd+K Cmd+S to match your muscle memory from other editors
Use Cmd+D for quick multi-cursor renaming within a file instead of Find & Replace
Use F2 (Rename Symbol) for cross-file refactoring — safer than search and replace
Install the Settings Sync extension or use built-in sync to keep shortcuts consistent across machines