Essential VS Code Hotkeys for Developer Productivity
As developers, one of the biggest productivity gains comes from mastering editor navigation and manipulation. Being able to quickly find functions, jump between files, and edit code efficiently lets us focus more on solving hard problems rather than fighting with our editor.
Here are my favorite VS Code productivity techniques and hotkeys. Especially useful is the #
command to search symbols across your workspace.
Navigation
File Navigation
Cmd + P
: Quick open files with fuzzy search@
: Jump to symbols in current file#
: Search symbols across workspace%
: Search text across all files
Go Back/Forward
Ctrl + -
: Jump back to previous cursor locationsCtrl + Shift + -
: Go forward to next cursor location- Works across files and cursor positions
Last Edit Location
Cmd + K, Cmd + Q
: Jump to where you last made an edit- Great for returning after exploring other files
Switch Between Recent Tabs
Ctrl + Tab
: Show and cycle through recent tabs- Quick tap to toggle between last 2 files
- Hold to see full list ordered by recency
Go to Line/Column
- Open command palette:
:22
jumps to line 22 :22:10
jumps to line 22, column 10- Helpful for stack traces and minified files
Definition & References
Ctrl + Click
orF12
: Go to definitionShift + F12
: Find all references- Great for exploring unfamiliar codebases
Editing
Line Operations
Option + Shift + ↑/↓
: Duplicate line up/downOption + ↑/↓
: Move line up/down ("bubble" lines)- Works with multiple selected lines
Smart Selection
Option + ←/→
: Move by wordOption + Shift + ←/→
: Select by wordCmd + ←/→
: Jump to line start/endCmd + K, ;
: Select within quotes (requires Quick and Simple Text Selection plugin)
Expanding Selection
Cmd + Shift + ←/→
: Select to line start/end- Search "Expand Selection to Scope" in command palette
- Incrementally selects larger code blocks
Quote Management
Cmd + '
: Toggle between quote types (with plugin)- Works with single, double, and backtick quotes
Pro Tips
Use the Command Palette
Cmd + Shift + P
: Opens command palette- Search for commands you can't remember
- Shows keyboard shortcuts for commands
Enable Breadcrumbs
- Shows file location and code structure
- Quick navigation between sibling files
- Access symbols and file hierarchy
Remember: The goal is to minimize mouse usage and maximize keyboard efficiency. Start with a few shortcuts and gradually incorporate more as they become muscle memory.
Source: MAXIMUM VS Code Productivity — Navigating Codebases Quickly - YouTube. Thanks to Wes Bos for the video.