Skip to content

VS Code Shortcuts & Tricks (80/20 Guide)#

Note: Master these few shortcuts to double your coding speed. Based on Windows keybindings.


1️⃣ Essential Navigation#

Action Shortcut Description
Command Palette Ctrl + Shift + P The "God Mode" - run any command from here.
Quick Open Ctrl + P Find and open files by name instantly.
Go to Line Ctrl + G Jump to a specific line number.
Go to Symbol Ctrl + Shift + O Jump to a function, class, or variable in the current file.
Switch Tab Ctrl + Tab Switch between open files (like Alt+Tab).
Split Editor Ctrl + \ Open the current file in a split view.
Toggle Sidebar Ctrl + B Show/Hide the file explorer.
Toggle Terminal `Ctrl + `` Show/Hide the integrated terminal.

2️⃣ Editing & Line Manipulation#

Action Shortcut Description
Multi-Cursor Alt + Click Add a cursor at each click location.
Multi-Cursor (Next) Ctrl + D Select the next occurrence of the current word.
Move Line Alt + ↑ / ↓ Move the current line up or down.
Copy Line Shift + Alt + ↑ / ↓ Duplicate the current line up or down.
Delete Line Ctrl + Shift + K Delete the entire line.
Comment Code Ctrl + / Toggle line comment.
Format Document Shift + Alt + F Prettify the code.
Rename Symbol F2 Rename a variable/function across the whole project.

3️⃣ Search & Replace#

Action Shortcut Description
Find in File Ctrl + F Search within the current file.
Replace in File Ctrl + H Search and replace in current file.
Global Search Ctrl + Shift + F Search across the entire project.
Global Replace Ctrl + Shift + H Replace across the entire project.
  • Match Case (Alt + C): Useruser.
  • Match Whole Word (Alt + W): log won't match login.
  • Use Regex (Alt + R): Use regex patterns (see Regex Guide).
  • Example: console\.log\(.*\) to find all logs.

When using Global Search (Ctrl + Shift + F), click the three dots (...) to see "files to include/exclude".

  • files to exclude:
  • **/*.test.ts (Ignore test files)
  • dist/, build/ (Ignore build artifacts)
  • node_modules/ (Usually ignored by default)

5️⃣ Snippets & IntelliSense#

  • Trigger Suggestion: Ctrl + Space (Force IntelliSense to show up).
  • Quick Fix: Ctrl + . (Auto-import, fix spelling, etc.).
  • Go to Definition: F12 (Jump to where the code is defined).
  • Peek Definition: Alt + F12 (See definition without leaving current file).

6️⃣ Integrated Terminal Shortcuts#

Action Shortcut
New Terminal `Ctrl + Shift + ``
Kill Terminal Trash Icon (or exit command)
Scroll Up/Down Ctrl + Shift + ↑ / ↓
Clear Terminal Ctrl + L (if using bash/zsh) or cls (cmd)

7️⃣ Zen Mode#

  • Toggle Zen Mode: Ctrl + K, then Z (Distraction-free coding).