Visual Studio Code has become the go-to editor for millions of developers. Whether you're building web applications, backend services, mobile apps, or cloud solutions, chances are VS Code is part of your daily workflow.
When I first started using VS Code, I relied almost entirely on the mouse. Over time, I discovered that learning a handful of keyboard shortcuts dramatically improved my productivity.
Here are 15 shortcuts I use almost every day, along with examples of when they come in handy.
1. Quick Open Files
Windows/Linux
Ctrl + P
macOS
Cmd + P
Instantly search and open any file in your project.
Instead of navigating through folders, simply type:
user.service.ts
and press Enter.
2. Command Palette
Ctrl + Shift + P
Think of this as VS Code's control center.
You can:
- Rename symbols
- Change themes
- Run extensions
- Format documents
- Open settings
If you can't remember where an option lives, chances are it's available here.
3. Multi-Cursor Editing
Alt + Click
Need to edit several lines at once?
Place multiple cursors and type simultaneously.
Perfect for:
- Updating repeated variable names
- Editing JSON
- Modifying configuration files
4. Rename Symbol
F2
Instead of manually replacing every occurrence of a variable or method, press F2.
VS Code intelligently updates references across your project.
5. Format Document
Shift + Alt + F
One shortcut instantly formats your code.
Works especially well with:
- TypeScript
- JavaScript
- C#
- JSON
- HTML
- CSS
6. Find Across the Project
Ctrl + Shift + F
Search every file in your workspace.
Extremely useful when:
- Refactoring code
- Finding API endpoints
- Locating configuration values
7. Replace Across Files
Ctrl + Shift + H
Perfect for large-scale refactoring.
Example:
Replace
OldApiService
with
UserApiService
across hundreds of files in seconds.
8. Duplicate a Line
Shift + Alt + Down Arrow
This duplicates the current line.
Great for:
- Creating similar objects
- Repeating configuration blocks
- Experimenting with code
9. Move a Line Up or Down
Alt + Up Arrow
or
Alt + Down Arrow
Rearrange code without cutting and pasting.
10. Toggle Terminal
Ctrl + `
Quickly open or close the integrated terminal.
Ideal for running:
- npm install
- dotnet run
- git commands
- Angular CLI
- Docker commands
without leaving VS Code.
11. Go to Definition
F12
Jump directly to the implementation of:
- Methods
- Classes
- Interfaces
- Variables
This is invaluable when navigating large codebases.
12. Peek Definition
Alt + F12
Instead of opening another file, peek at the definition in a small popup.
Perfect for quick inspections.
13. Comment or Uncomment Code
Ctrl + /
A simple but frequently used shortcut.
Ideal when debugging or temporarily disabling code.
14. Toggle Sidebar
Ctrl + B
Need more screen space?
Hide the Explorer and focus on your code.
15. Open Recently Used Files
Ctrl + Tab
Quickly switch between recently opened files.
Especially useful when working across multiple services or components.
Bonus Productivity Tips
Here are a few habits that complement these shortcuts:
- Enable Auto Save for fewer interruptions.
- Install GitLens to view Git history inline.
- Use Error Lens to surface errors directly in your code.
- Configure Prettier for automatic formatting.
- Learn your debugger shortcuts—they're just as valuable as editing shortcuts.
Small workflow improvements compound over time.
Final Thoughts
You don't need to memorize every VS Code shortcut overnight. Start with three or four that solve your biggest daily pain points, and gradually add more as they become second nature.
Even saving a few seconds on repetitive tasks adds up over weeks and months, letting you focus more on solving problems and writing great code.
Which VS Code shortcut has had the biggest impact on your workflow? Or is there a hidden gem that more developers should know? Share it in the comments—I’m always looking to improve my own workflow too.
🚀 Explore More Free Developer Tools
If you frequently work with JSON, APIs, formatting, encoding, validation, or debugging, you might enjoy ToolBenchApp.
ToolBenchApp is a growing collection of free browser-based developer tools built to simplify everyday development tasks. Whether you're formatting JSON, validating data, decoding JWTs, generating UUIDs, comparing text, or converting between common formats, the goal is to help developers work faster without leaving the browser.
I'm continuously expanding the platform based on real developer needs, so if there's a tool you'd like to see, I'd love to hear your ideas.
Top comments (0)