VS Code Shortcut Reference
Visual Studio Code gets faster when you treat the keyboard as the primary interface instead of a backup. The point of a shortcut reference is not to memorize dozens of obscure bindings. It is to make the high-frequency actions frictionless: opening files, switching symbols, jumping to definitions, viewing references, commenting code, opening the terminal, and fixing problems without breaking flow.
If you searched for Visual Studio Code shortcuts, VS code uncomment shortcut, Vscode comment multiple lines shortcut, or a printable shortcut reference, this page focuses on the commands that actually move daily development forward.
How to use this reference
- Learn one workflow at a time. Start with file navigation, then symbol navigation, then edit actions.
- Anchor shortcuts to the job. Remember “go to definition” and “go to references,” not a random key list.
- Customize only after the defaults make sense. VS Code supports keybinding changes well, but good defaults reduce the need.
High-value shortcuts for Windows and Linux
| Task |
Shortcut |
Why it matters |
| Show Command Palette |
Ctrl+Shift+P or F1 |
Entry point to almost everything |
| Quick Open file |
Ctrl+P |
Jump to files without browsing the sidebar |
| Go to Symbol in file |
Ctrl+Shift+O |
Jump inside the current file quickly |
| Go to Definition |
F12 |
Move from usage to source |
| Peek Definition |
Alt+F12 |
Inspect code without leaving context |
| Go to References |
Shift+F12 |
Find all usages of a symbol |
| Toggle Line Comment |
Ctrl+/ |
Comment or uncomment the current line selection |
| Toggle Block Comment |
Shift+Alt+A on Windows, Ctrl+Shift+A on Linux |
Useful for larger commented regions |
| Format Document |
Shift+Alt+F on Windows, Ctrl+Shift+I on Linux |
Keep code consistently formatted |
| Open Keyboard Shortcuts |
Ctrl+K Ctrl+S |
Inspect or customize bindings |
The three shortcut groups that matter most
1. Move through the codebase
Ctrl+P, Ctrl+Shift+O, F12, and Shift+F12 cover a huge percentage of navigation work. Open a file, jump to a symbol, visit its definition, then inspect its references. That is the backbone of productive code reading in VS Code.
2. Edit without breaking flow
Commenting, uncommenting, formatting, and multi-step refactors are much smoother when they stay on the keyboard. Even if you do not memorize dozens of shortcuts, learning the ones for comment toggling, rename, and formatting pays for itself quickly.
3. Use the Command Palette as the fallback
Whenever you forget a binding, open the Command Palette. It is effectively the searchable index of the editor. Over time, repeated commands become memorable because you use them by name first and by shortcut later.
Practical navigation workflow
A productive editor session often looks like this:
Ctrl+P to open a file by name
Ctrl+Shift+O to jump to a symbol within that file
F12 to go to a definition
Shift+F12 to see references without guesswork
Ctrl+Shift+P to reach a command you remember by name but not by keys
That sequence matters because it mirrors how developers actually move through code: file, symbol, definition, references, action.
About comment and uncomment shortcuts
A lot of people search specifically for the VS Code comment multiple lines shortcut or the uncomment shortcut. The practical rule is simple:
- use Toggle Line Comment for line-based commenting
- use Toggle Block Comment for block-style commenting
- running the toggle again removes the comment when the language supports it
That is why “comment” and “uncomment” are often the same shortcut in practice. The editor toggles the state rather than using unrelated commands.
Common questions
How do I go to references in VS Code?
Use Shift+F12 on Windows and Linux. This opens the references view for the symbol under the cursor so you can inspect usages without manually searching the whole codebase.
What is Ctrl+F7 in VS Code?
Ctrl+F7 is not one of the standard default shortcuts in the main VS Code reference for Windows and Linux. If it does something in your setup, the behavior is likely coming from a custom keybinding, a keymap extension, or another tool in your environment.
What is the quickest way to find a command I forgot?
Use Ctrl+Shift+P or F1 to open the Command Palette, then search by command name.
How should I learn VS Code shortcuts without memorizing all of them?
Group them by workflow: file navigation, symbol navigation, editing actions, and code intelligence. Learn the few commands you use every day first.
Keep shortcuts tied to code intelligence
The shortcuts become more valuable as language tooling improves. Go to definition, peek definition, and go to references work best when the language server or extension for your stack is configured well. In other words, keyboard speed and code intelligence reinforce each other. The shortcut is only the visible layer; the real win is a navigation model that keeps context intact.
Related references
Use the Vim reference for a modal editing contrast, the Git reference when code navigation turns into commit review, the Bash reference when you jump from the editor into the terminal, or the Postgres reference when the file you opened is a migration or query script.
Keep the printed reference small
A shortcut page becomes more useful when it stays selective. Ten reliable commands that cover navigation, editing, and code intelligence are better than a giant wall of bindings you never remember. That is the right mindset for Visual Studio Code as well: keep the default reference close, then customize only where repeated friction remains.