Tools Games AI
[ Ad Placement: Top Article Banner ]

VS Code Shortcuts That Save 100 Hours a Year

The Mouse is the Enemy of Speed

Watch a truly elite Senior Engineer write code. It looks like they are playing a piano. Menus open and close, files jump around, and massive blocks of text are refactored instantly—all without their hand ever leaving the keyboard to touch the mouse or trackpad. Every time you reach for your mouse to click a specific line of code or open the file explorer, you lose 2 seconds. Do that 100 times a day, 5 days a week, and you are wasting hundreds of hours a year on physical movement.

Visual Studio Code (VS Code) is heavily optimized for keyboard-only navigation. Memorizing these advanced shortcuts is the fastest way to double your coding velocity.

The Holy Trinity of Navigation

  • The Command Palette (Ctrl+Shift+P or Cmd+Shift+P): This is the brain of VS Code. You never need to memorize where a setting is in the menu bar again. Just open the palette and type "Format Document" or "Git Fetch".
  • Go to File (Ctrl+P or Cmd+P): Never click through the nested folder tree on the left sidebar again. Press this, type a few letters of the file name (e.g., userv will instantly find userService.ts), and press enter.
  • Go to Symbol (Ctrl+Shift+O or Cmd+Shift+O): Inside a massive 1,000-line file, finding a specific function is tedious. Press this shortcut, and a list of all variables, classes, and functions in the file appears. Type to filter and jump instantly to that block.

The Magic of Multiple Cursors

If you have an array of 10 strings, and you need to add the word "async" before each one, clicking and typing 10 times is agonizing. VS Code allows you to have multiple cursors typing simultaneously.

  • Select Next Occurrence (Ctrl+D or Cmd+D): Highlight a word. Press Cmd+D. VS Code finds the exact next instance of that word and adds a second cursor. Press it 5 times, you have 6 cursors. Type once, edit everywhere.
  • Select All Occurrences (Ctrl+Shift+L or Cmd+Shift+L): Instantly puts a cursor on every single instance of the highlighted word in the entire document.

Line Manipulation Wizardry

Stop highlighting a line, pressing Ctrl+X, clicking a new line, and pressing Ctrl+V just to move a block of code.

  • Move Line Up/Down: Hold Alt (or Option) and press the Up/Down arrow keys. The entire line (or highlighted block) will physically move up and down through your code, automatically handling indentation.
  • Duplicate Line: Hold Shift+Alt (or Shift+Option) and press the Down arrow. The line is instantly duplicated below. This is incredibly fast for building out massive JSON objects or repetitive HTML structures.
[ Ad Placement: Bottom Article Banner ]