Most of the time you spend in an editor isn't typing code — it's finding it, moving around it, and manipulating existing lines. Learning a handful of VS Code shortcuts pays for itself within a day.
Navigation is everything
The command palette and quick-open are the two shortcuts to learn first. They replace almost all menu digging.
Ctrl/Cmd + P Quick open file by name
Ctrl/Cmd + Shift+P Command palette (run any command)
Ctrl/Cmd + P then @ Jump to symbol in the current file
Ctrl/Cmd + G Go to line number
F12 Go to definition
Alt/Opt + ←/→ Navigate back / forwardEditing lines fast
These operate on whole lines without selecting them first, which is faster than it sounds once it's automatic.
Alt/Opt + ↑/↓ Move line up / down
Shift + Alt/Opt + ↑/↓ Copy line up / down
Ctrl/Cmd + Shift + K Delete line
Ctrl/Cmd + / Toggle line comment
Ctrl/Cmd + Enter Insert line belowMulti-cursor magic
Multiple cursors turn repetitive edits into one action.
Ctrl/Cmd + D Select next occurrence of selection
Ctrl/Cmd + Shift + L Select all occurrences
Alt/Opt + Click Add a cursor anywhereTakeaways
- Master quick-open and the command palette before anything else.
- Line-move and line-duplicate replace a lot of select-and-drag.
Ctrl/Cmd + Dfor incremental multi-select is the highest-leverage edit key.
Open the Keyboard Shortcuts editor (Ctrl/Cmd + K Ctrl/Cmd + S) and customize
the few that fight your muscle memory from other tools.