25 VS Code Productivity Tips and Speed Hacks
Based on Fireship's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Use the VS Code CLI “code” command to open directories/files from the terminal instead of relying on the file explorer.
Briefing
VS Code speed comes down to one practical shift: stop treating the editor like a point-and-click app and start using keyboard-driven navigation, editing, and automation. The payoff is immediate—fewer context switches, less scrolling, and faster iteration—without needing to switch to extreme editor workflows like Vim or Emacs.
A core starting point is opening projects efficiently. Instead of using the file explorer, the command-line “code” command can open directories or edit files directly; on macOS and Linux it requires adding the VS Code binary to the PATH first. Once inside the editor, the biggest productivity lever is reducing mouse reliance. Nearly every action available through menus and buttons can be triggered from the keyboard, and learning a small set of shortcuts—roughly 10 to 20—can change day-to-day speed.
The command palette (opened with Ctrl+P) acts as the central control surface. It can jump to recently opened files, search by filename, and—when typed with a “>” style query—surface virtually any command, including extension commands. For example, the “Quokka” extension can run JavaScript directly in the editor: it executes code in the background and appends output inline, enabling rapid prototyping without constantly switching to a separate runner.
Navigation and editing shortcuts then cut out the most common time sinks. Ctrl+F finds text in the current file, but symbol-level navigation is faster: using the “@” query in the command palette lists symbols across the project for quick jumps. For line-based edits, Ctrl+G (followed by a line number) moves the cursor precisely, while Ctrl+D repeated selects the next occurrence of the current selection—turning one edit into many. Multi-cursor editing is also a major accelerator: Alt+click creates cursors in multiple locations, which is especially useful for repetitive patterns like CSS properties or matching HTML tag edits. The Auto Rename Tag extension can automatically keep opening and closing tags synchronized.
Editing flow extends into cut/copy, commenting, and formatting. Ctrl+X cuts the current line without highlighting; Alt+Up/Down moves the line, and Alt+Shift+Up/Down copies it while moving. For comments, Ctrl+/** toggles comment blocks on selected code instead of manually prefixing each line. For JavaScript documentation-style comments, the “Add js.com” extension can generate structured comments from selected functions, and “Better Comments” adds visual emphasis—lines starting with “!” turn red and TODOs become orange.
Beyond editing, VS Code’s terminal and Git tooling reduce friction. Ctrl+` opens a terminal in the current working directory, and multiple sessions can be renamed and color-coded for clarity. Ctrl+K clears the terminal after an error, and the up arrow reruns the last command. Repeated commands like “npm run test” can be replaced with VS Code tasks (JSON-defined) invoked from the command palette. For version control, the Source Control tab supports staging via point-and-click, with icons indicating modified/added/removed files; Git Lens adds deeper visualization and blame attribution. Finally, remote workflows can eliminate cloning overhead via GitHub remote repositories, plus remote SSH and remote containers for server and Docker-based development.
The remaining productivity gains come from reducing boilerplate and safer refactors. Custom snippets (configured via “Configure User Snippets”) let developers insert repeated templates quickly, while framework-specific snippet extensions may already exist. For schema work in TypeScript, the “JSON to TS” (quicktype-based) approach can infer types from JSON. When renaming, avoid risky project-wide find/replace; instead, use “Find all references” and “Rename Symbol” to update identifiers safely across files.
Cornell Notes
Speed in VS Code hinges on keyboard-first workflows and small, high-impact habits. The command palette (Ctrl+P) centralizes file navigation and command execution, including extension actions like Quokka’s inline JavaScript output. Symbol search and precise cursor movement (using @ for symbols and Ctrl+G for line jumps) prevent time-wasting scrolling. Editing accelerators—Ctrl+D for repeated selections, Alt+click for multi-cursors, and Ctrl+/** for comment toggling—turn single changes into batch edits. Automation and tooling (tasks, terminal shortcuts, Source Control staging, Git Lens, and remote repository/SSH/container extensions) reduce repetitive setup and make iteration faster and safer.
Why does the command palette matter more than memorizing lots of shortcuts?
What’s the fastest way to navigate to code without scrolling in large files?
How do multi-cursor and repeated selection shortcuts change editing speed?
What shortcuts streamline common editing tasks like cutting, moving, and commenting?
How does VS Code reduce repetition in the terminal and in Git workflows?
How can remote development features remove the need for local cloning and setup?
Review Questions
- Which command palette query would you use to jump to symbols rather than filenames, and why is it faster in large codebases?
- Describe a workflow that uses Ctrl+D and multi-cursor editing to modify repeated code patterns in one pass.
- When should a developer prefer tasks over repeatedly typing terminal commands, and what’s the role of the command palette in running those tasks?
Key Points
- 1
Use the VS Code CLI “code” command to open directories/files from the terminal instead of relying on the file explorer.
- 2
Adopt keyboard-first habits: most mouse actions have keyboard equivalents, and learning a small set of shortcuts yields outsized gains.
- 3
Rely on the command palette (Ctrl+P) as a discovery tool for commands and extension actions, not just a file switcher.
- 4
Speed up navigation by using @ symbol search for symbols across the project and Ctrl+G for precise line jumps.
- 5
Turn single edits into batch edits with Ctrl+D (repeated selection) and Alt+click (multi-cursors), and use Auto Rename Tag to keep paired tags consistent.
- 6
Replace repetitive terminal commands with VS Code tasks so commands like “npm run test” run from the command palette.
- 7
Use Source Control staging and Git Lens to reduce Git command memorization and improve debugging with blame attribution.