QuickRef.tips
Cheat sheet

VS Code Keyboard Shortcuts

The command palette is the one binding worth learning first, because every other command in the editor can be reached through it. The bindings below are the Windows and Linux defaults, grouped by the task they serve rather than alphabetically, so the ones you use together sit together.

14 shortcuts across 3 groups

General
KeysAction
Ctrl + Shift + POpen the command palette
Ctrl + PQuick open a file by name
Ctrl + ,Open settings
Ctrl + BToggle the sidebar
Ctrl + `Toggle the integrated terminal
Editing
KeysAction
Alt + Up / DownMove the current line up or down
Shift + Alt + DownCopy the line down
Ctrl + /Toggle a line comment
Ctrl + DAdd the next matching selection
Ctrl + Shift + KDelete the current line
Navigation
KeysAction
Ctrl + GGo to a line number
F12Go to definition
Ctrl + TabCycle through open editors
Ctrl + Shift + FSearch across all files

Source: Visual Studio Code key bindings documentation. Bindings listed for Windows. On macOS, Cmd replaces Ctrl in most of these bindings, but not all: the vendor documentation publishes a separate macOS keymap and it is the authority, not a substitution rule. The VS Code version these bindings were checked against is not established, so treat any binding that does not work as a version difference and check the vendor documentation linked above. 14 shortcuts.

Getting these into muscle memory

A cheat sheet only helps if the bindings move from the page into your hands. The fastest way is to pick two or three shortcuts from a single group above, force yourself to use them for a few days even when the mouse feels quicker, and only then add more. Trying to memorize an entire sheet at once rarely sticks, because none of the bindings get enough repetition to become automatic.

The groups here are ordered by how often you reach for them. Openers and palettes come first because they unlock everything else, then editing and navigation, which is where most of a session is spent. Keep this page open in a tab while you learn, and it will quietly work its way out of your sight and into your fingers.

See also