Turning Learners Into Developers
Codekilla
CODEKILLA
VS Code 6 min

VS Code Shortcut Keys (Complete List with Examples)

Master VS Code with this exhaustive list of keyboard shortcuts to 10x your productivity.

Rahul Chaudhary Tue Apr 21 2026
What is VS Code Shortcut Keys?

VS Code shortcut keys are keyboard combinations that let you execute commands without reaching for your mouse. Instead of clicking through menus to format code, open files, or navigate between functions, you press a key combo and get instant results. These shortcuts are context-aware — they change behaviour based on what you're editing or which panel is active.

Think of shortcuts as speed multipliers for your workflow. The average developer spends 30-40% of their coding time on repetitive tasks like searching files, renaming variables, or toggling panels. Mastering even 10-15 shortcuts can cut that time in half, letting you stay in the flow state longer and ship features faster.

Why It Matters
  • Eliminates context switching — Your hands never leave the keyboard, keeping your brain focused on problem-solving instead of UI navigation
  • Speeds up refactoring — Rename symbols across files, extract functions, or reformat entire documents in seconds instead of minutes
  • Reduces cognitive load — Muscle memory handles navigation while your working memory stays fixed on logic and architecture
  • Levels the playing field — Junior devs who know shortcuts often outpace seniors who rely on mouse clicks for everything
  • Makes remote work smoother — Less mouse movement means less latency frustration on slower connections
Essential Navigation Shortcuts

Navigating your codebase efficiently is the foundation of productivity. These shortcuts help you jump between files, symbols, and lines without scrolling or clicking.

Quick Open (Ctrl+P / Cmd+P) is your file launcher. Type any part of a filename and hit Enter. Works with fuzzy matching — type "usrmod" to find user-model.ts. Add : after the filename to jump to a specific line number.

javascript
// Press Ctrl+P, type "auth:42" to jump to line 42 in auth.js
function validateToken(token) {
  if (!token) return false;
  const decoded = jwt.verify(token, SECRET_KEY);
  return decoded.exp > Date.now();
}

Go to Symbol (Ctrl+Shift+O / Cmd+Shift+O) lists all functions, classes, and variables in the current file. Type to filter, then jump instantly. Add : before your search to group symbols by type.

ShortcutPurposePro Tip
Ctrl+POpen filesAdd @ to search symbols across workspace
Ctrl+GGo to lineType line number directly
F12Go to definitionWorks across files and node_modules
Alt+←/→Navigate historyJump back/forward through cursor positions
Code Editing Power Moves

These shortcuts transform how you write and manipulate code. They turn tedious multi-click operations into single keystrokes.

Multi-Cursor Editing (Ctrl+D / Cmd+D) selects the next occurrence of your current selection. Hit it three times to select three instances, then type to change all simultaneously. Use Ctrl+Shift+L to select ALL occurrences at once.

python
# Select "status" and press Ctrl+D twice to edit all three
user_status = "active"
admin_status = "active"
guest_status = "pending"
# Now type "role" to replace all "status" with "role"

Move Line Up/Down (Alt+↑/↓ / Option+↑/↓) shifts entire lines without cut-paste. Copy Line Up/Down (Shift+Alt+↑/↓) duplicates lines instantly — perfect for creating similar function calls or CSS rules.

css
.button {
  padding: 12px 24px;
  border-radius: 8px;
  /* Place cursor here, press Shift+Alt+↓ to duplicate */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
Search and Replace Mastery

Finding and replacing text is a daily task. These shortcuts make it surgical.

Find in Files (Ctrl+Shift+F / Cmd+Shift+F) searches your entire project. Use regex mode for pattern matching, and the files to include/exclude field to narrow scope. Alt+Enter selects all matches, turning them into multi-cursor positions.

Find TypeShortcutWhen to Use
Current fileCtrl+FQuick variable checks
All filesCtrl+Shift+FRefactoring API calls, imports
ReplaceCtrl+HRename across single file
Replace all filesCtrl+Shift+HMass updates (use with caution)
typescript
// Find "any" and replace with proper types across project
// Before: function process(data: any) { }
function process(data: UserData): Promise<Response> {
  return fetch('/api/users', {
    method: 'POST',
    body: JSON.stringify(data)
  });
}
Panel and View Management

Organizing your workspace keeps you focused. These shortcuts control what you see.

Toggle Sidebar (Ctrl+B / Cmd+B) hides the file explorer for more code space. Toggle Terminal (Ctrl+\`` / Cmd+`) brings up the integrated terminal without leaving VS Code. **Zen Mode** (Ctrl+K Z`) removes ALL UI chrome for deep focus.

Split Editor (Ctrl+\ / Cmd+\) creates side-by-side panes. Navigate between them with Ctrl+1/2/3. This is essential for comparing files or working with tests alongside implementation.

bash
# Terminal example: Run build while viewing code
npm run build:watch
# Press Ctrl+` to hide terminal, Ctrl+1 to focus editor
Code Intelligence Shortcuts

VS Code's IntelliSense and refactoring tools are powerful, but only if you can trigger them quickly.

Trigger Suggest (Ctrl+Space) forces autocomplete when it doesn't appear automatically. Parameter Hints (Ctrl+Shift+Space) shows function signatures while typing arguments. Quick Fix (Ctrl+. / Cmd+.) opens the lightbulb menu for auto-imports, refactorings, and lint fixes.

ActionShortcutExample Use
Rename symbolF2Change variable name everywhere
Format documentShift+Alt+FAuto-fix indentation/spacing
Go to referencesShift+F12See all uses of a function
Peek definitionAlt+F12Inline view without switching files
javascript
// Place cursor on "calculateTotal", press F2, type new name
function calculateTotal(items) {
  return items.reduce((sum, item) => sum + item.price, 0);
}

const cartTotal = calculateTotal(shoppingCart);
// Both instances renamed automatically
Quick Cheat Sheet
NeedReach for
Open any file fastCtrl+P then type filename
Jump to function/classCtrl+Shift+O in current file
Edit multiple spots at onceCtrl+D to select next occurrence
Move code blocksAlt+↑/↓ to shift lines
See all file referencesShift+F12 on symbol
Fix imports/errorsCtrl+. for Quick Fix menu
Hide all distractionsCtrl+K Z for Zen Mode
Format messy codeShift+Alt+F to auto-format
Search entire projectCtrl+Shift+F for global find
Rename across filesF2 on variable/function
Common Mistakes
  • Ignoring Ctrl+P — New users keep clicking the file tree. Quick Open is 10x faster once you memorize it.
  • Using Ctrl+F instead of Ctrl+Shift+F for refactoring — Single-file find misses references in other modules, breaking changes silently.
  • Not customizing keybindings — Default shortcuts conflict with OS or extensions. Open Keyboard Shortcuts (Ctrl+K Ctrl+S) and remap what feels awkward.
  • Forgetting Ctrl+. — You manually type import statements when Quick Fix would auto-import with one keystroke.
  • Overusing Ctrl+Z instead of Ctrl+Shift+Z — Undo has a counterpart (Redo) that most people forget, leading to lost work after accidental undos.
  • Selecting text before Move Line — You don't need to highlight code before using Alt+↑/↓. Just place your cursor anywhere on the line.

💡 Think Like a Programmer: Your keyboard is a command-line interface for your editor. Every mouse click is a slow syscall — shortcuts are direct memory access to your workflow.

// was this useful?
Did this article answer your question?
// VS Code · published by Codekilla
// related articles

Keep Reading