VS Code shortcuts reduce context-switching by keeping hands on the keyboard during editing, navigation, and debugging. The patterns below cover the 80% of shortcuts worth memorizing. Mac uses Cmd; Windows and Linux use Ctrl in the same position. The key binding system is fully remappable via keybindings.json (Cmd/Ctrl+Shift+P > “Open Keyboard Shortcuts (JSON)”). For terminal-first workflows, see bash-one-liners and vim-commands.
File and window operations
Action
Mac
Windows / Linux
Open file by name
Cmd+P
Ctrl+P
Open command palette
Cmd+Shift+P
Ctrl+Shift+P
New file
Cmd+N
Ctrl+N
Save
Cmd+S
Ctrl+S
Save all
Cmd+Option+S
Ctrl+K S
Close tab
Cmd+W
Ctrl+W
Reopen closed tab
Cmd+Shift+T
Ctrl+Shift+T
Split editor
Cmd+\
Ctrl+\
Switch editor group
Cmd+1/2/3
Ctrl+1/2/3
Toggle sidebar
Cmd+B
Ctrl+B
Toggle terminal
Ctrl+`
Ctrl+`
Open settings (UI)
Cmd+,
Ctrl+,
Open settings (JSON)
Cmd+Shift+P > “settings json”
same
Navigation
Action
Mac
Windows / Linux
Go to symbol in file
Cmd+Shift+O
Ctrl+Shift+O
Go to symbol in workspace
Cmd+T
Ctrl+T
Go to definition
F12
F12
Peek definition
Option+F12
Alt+F12
Go to references
Shift+F12
Shift+F12
Go to line
Ctrl+G
Ctrl+G
Go back / forward
Ctrl+- / Ctrl+Shift+-
Alt+Left / Alt+Right
Breadcrumb focus
Cmd+Shift+.
Ctrl+Shift+.
Quick open recent
Ctrl+R
Ctrl+R
Move between tabs
Cmd+Option+Left/Right
Ctrl+PageUp/Down
# Quick symbol jump workflow:
Cmd+T → type "UserService" → Enter → instant jump across all files
Search and replace
Action
Mac
Windows / Linux
Find in file
Cmd+F
Ctrl+F
Find and replace in file
Cmd+H
Ctrl+H
Find in workspace
Cmd+Shift+F
Ctrl+Shift+F
Replace in workspace
Cmd+Shift+H
Ctrl+Shift+H
Select all occurrences
Cmd+Shift+L
Ctrl+Shift+L
Add next occurrence to selection
Cmd+D
Ctrl+D
Skip current occurrence
Cmd+K Cmd+D
Ctrl+K Ctrl+D
Toggle regex in search
Cmd+Option+R (in search box)
Alt+R
Multi-cursor and selection
Action
Mac
Windows / Linux
Add cursor above / below
Cmd+Option+Up/Down
Ctrl+Alt+Up/Down
Add cursor at click
Option+Click
Alt+Click
Select to line end
Shift+End
Shift+End
Expand selection to word
Cmd+Shift+Right
Ctrl+Shift+Right
Select current line
Cmd+L
Ctrl+L
Move line up / down
Option+Up/Down
Alt+Up/Down
Copy line up / down
Shift+Option+Up/Down
Shift+Alt+Up/Down
Delete line
Cmd+Shift+K
Ctrl+Shift+K
Insert line below
Cmd+Enter
Ctrl+Enter
Insert line above
Cmd+Shift+Enter
Ctrl+Shift+Enter
Join line below
Ctrl+J (not default; add in keybindings)
Refactoring
Action
Mac
Windows / Linux
Rename symbol
F2
F2
Extract to function/variable
Cmd+. then choose
Ctrl+. then choose
Quick fix / code action
Cmd+.
Ctrl+.
Format document
Shift+Option+F
Shift+Alt+F
Format selection
Cmd+K Cmd+F
Ctrl+K Ctrl+F
Organize imports
Shift+Option+O
Shift+Alt+O
Fold / unfold region
Cmd+Option+[/]
Ctrl+Shift+[/]
Fold all / unfold all
Cmd+K Cmd+0 / Cmd+K Cmd+J
Ctrl+K 0 / Ctrl+K J
Terminal
Action
Mac
Windows / Linux
New terminal
Ctrl+Shift+`
Ctrl+Shift+`
Toggle terminal panel
Ctrl+`
Ctrl+`
Kill terminal
Cmd+K (in terminal)
same (if configured)
Clear terminal
Cmd+K
Ctrl+K (shell shortcut)
Next / previous terminal
Ctrl+PageDown/Up
Ctrl+PageDown/Up
Focus terminal from editor
Ctrl+`
Ctrl+`
Focus editor from terminal
Cmd+1
Ctrl+1
Run selected text in terminal
(assign via keybindings)
Debugging
Action
Mac
Windows / Linux
Start / continue
F5
F5
Stop
Shift+F5
Shift+F5
Restart
Cmd+Shift+F5
Ctrl+Shift+F5
Step over
F10
F10
Step into
F11
F11
Step out
Shift+F11
Shift+F11
Toggle breakpoint
F9
F9
Toggle inline breakpoint
Shift+F9
Shift+F9
Open debug console
Cmd+Shift+Y
Ctrl+Shift+Y
Common gotchas
Cmd+D selects the next occurrence of the current word, not all occurrences. Use Cmd+Shift+L to select all at once.
Multi-cursor column editing requires placing cursors first with Cmd+Option+Down, then typing. It does not select a rectangular block automatically; use the box-select extension for that.
F12 (go to definition) jumps to the compiled type declaration for npm packages unless you have source maps and the package includes declarationMap. Set "declarationMap": true in tsconfig.json to jump to the source.
Shift+Option+F (format document) uses the default formatter. If multiple formatters are installed, VS Code prompts you to choose; set a default in settings.json with "editor.defaultFormatter".
Opening the command palette with Cmd+P then typing > switches to command mode. This is the same as Cmd+Shift+P; the > prefix selects commands vs files.