Get AI summaries of any video or article — Sign up free
VS Code Top-Ten Pro Tips thumbnail

VS Code Top-Ten Pro Tips

Fireship·
6 min read

Based on Fireship's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Use Ctrl+P to centralize navigation and actions; typing a filename inside the command palette jumps to matching files quickly.

Briefing

Visual Studio Code’s biggest advantage isn’t just that it’s popular—it’s that it compresses a whole development workflow (navigation, scaffolding, running tasks, autocompletion, debugging, and Git) into one editor. The practical payoff is speed: fewer context switches between the file system, the terminal, and the browser, plus safer refactors and stronger tooling when using TypeScript.

The workflow starts with moving around the project without clicking. Opening a folder from the command line gets the editor pointed at the right place immediately, while memorizing a few key bindings keeps momentum. Ctrl+P brings up the command palette and becomes the hub for most actions. From there, typing a filename jumps directly to matching files in the workspace tree—faster than browsing directories. For more precise navigation, a bookmark plugin lets developers mark specific code blocks with numbers and return to them later through the same command palette.

For Angular projects, productivity gains come from snippet libraries. Installing snippet packs (notably from Mike Moreland and John Papa) feeds Angular boilerplate into VS Code’s IntelliSense, so typing a snippet prefix can generate repetitive structures like an NG switch statement. The same approach extends to related ecosystems such as Angular Material and other Angular-adjacent libraries.

The editor’s command-line integration also reduces friction. VS Code’s integrated terminal (E) can be opened quickly, and the command palette can surface project scripts automatically—so NPM tasks appear without manually typing long commands. That leads into IntelliSense, which is especially powerful in strongly typed languages like TypeScript. Developers can use Ctrl+Space for completion, use @ in the command palette to list interfaces, methods, and properties defined in a file, and jump to type definitions with “Peek definition.” “Find references” reveals every usage site of an interface across the project, while “Rename symbol” (F2) updates all references safely—avoiding the brittleness of text-based find-and-replace.

Strong typing can also be retrofitted. The “Paste JSON as Code” extension turns a pasted JSON response (example shown with the Twitter API) into TypeScript interfaces, giving immediate tooling benefits even when an API doesn’t ship types.

When things break, VS Code’s debugging workflow aims to keep state visible. Zen mode (Ctrl+K Z) can strip distractions, then the debugger can attach to a Node script with breakpoints, local variables, call stacks, and a live debug console. For front-end work, the Chrome debugger lets Angular apps run on localhost:4200 with breakpoints set before component initialization and on user actions like button clicks, while the debugger highlights code and exposes runtime state.

Version control is handled inside the editor as well. Git status coloring (green modified, yellow untracked, red errors) appears directly in the file list, and commits can be made from the Git tab without running git add/commit commands manually. Rollbacks, file-level reverts, and partial staging (plus button) support more careful changes. For team-heavy work, GitLens adds commit history and “who changed what and when” context, including hover annotations and richer Git navigation.

Finally, collaboration features round out the toolset. VS Code Live Share connects a GitHub or Microsoft account to enable real-time co-editing—positioned as a Google Docs-style workflow for code—so multiple developers can work on the same document together. Together, these features make VS Code less of a text editor and more of an end-to-end development environment.

Cornell Notes

VS Code’s pro tips focus on compressing the full development loop—navigation, scaffolding, running tasks, autocompletion, debugging, and Git—into one place. Fast project navigation relies on Ctrl+P (command palette) and filename search, with optional code-block bookmarking for precise jumps. TypeScript-driven IntelliSense boosts productivity through completion, @-based symbol listing, Peek definition, Find references, and Rename symbol (F2), while “Paste JSON as Code” can generate interfaces from pasted API JSON (example: Twitter API). Debugging supports both Node scripts and Angular-in-Chrome workflows with breakpoints, variable inspection, and a live debug console. Git integration (plus GitLens) brings status, commits, staging, and “who changed what” context into the editor, and Live Share enables real-time collaboration via GitHub or Microsoft accounts.

How does Ctrl+P change day-to-day navigation in a large codebase?

Ctrl+P opens the command palette, which becomes the central control surface. Typing a filename inside the palette searches the workspace tree and jumps straight to the matching file, avoiding manual directory clicking. The same palette is also used to navigate to bookmarked code blocks later, keeping context switches low when working across many files.

Why does TypeScript tooling matter more than generic autocomplete?

In strongly typed code, IntelliSense can do more than suggest words. Developers can use Ctrl+Space for completion, use “@” in the command palette to list interfaces/methods/properties defined in the current file, and use Peek definition to jump to type definitions even when they live inside node_modules. Find references shows every usage site of an interface, and Rename symbol (F2) updates all code references safely across the project—reducing the risk of broken builds compared with text-based find/replace.

What’s the practical value of “Paste JSON as Code” for API work?

When an API response is JSON (even from services like the Twitter API), developers can paste the JSON into a file, then run the “Paste JSON as Code” command to generate a top-level TypeScript interface (e.g., tweet) and the nested interfaces that model the response. That immediately unlocks strong typing benefits—autocomplete, type checking, and safer refactors—without waiting for the API to provide official types.

How does debugging differ between Node scripts and Angular in the browser?

For Node, VS Code can attach the debugger to a running script, stop at red-dot breakpoints, and show local variables, global variables, and the call stack, plus a debugger console to run commands in the script’s current context. For Angular, the Chrome debugger launches the app on localhost:4200 using a launch configuration, then breakpoints can be set in component code—both before initialization and on events like button clicks—so runtime state can be inspected in the browser while stepping through code.

What Git workflow improvements come from using VS Code’s Git tab and GitLens?

The Git tab surfaces file status directly (green for modified, yellow for untracked, red for errors) and supports committing from the editor without manually running git add/commit commands. It also enables rollbacks, file-level reverts, and partial staging via the plus button. GitLens adds deeper context: it annotates code with hover details like who wrote it, when, and the commit ID, and provides richer navigation for stashes, tags, and remotes—useful when coordinating with junior developers.

How does VS Code Live Share support team collaboration?

Live Share connects a GitHub or Microsoft account to VS Code, then enables multiple team members to collaborate on a single document in real time, described as a Google Docs-style experience for code. After clicking Share, it returns a link that can be sent to others so they can join the same editing session.

Review Questions

  1. Which specific key bindings and command palette actions help you jump to files, list symbols, and navigate to definitions or references?
  2. How do Rename symbol (F2) and Find references reduce risk compared with basic text search?
  3. What steps and configurations are needed to debug an Angular app in Chrome on localhost:4200 versus a Node script?

Key Points

  1. 1

    Use Ctrl+P to centralize navigation and actions; typing a filename inside the command palette jumps to matching files quickly.

  2. 2

    Bookmark code blocks with a plugin so specific sections can be revisited later through the command palette.

  3. 3

    Install Angular snippet libraries (Mike Moreland and John Papa) to generate boilerplate via IntelliSense snippet prefixes.

  4. 4

    Leverage TypeScript IntelliSense features—@ symbol listing, Peek definition, Find references, and Rename symbol (F2)—to navigate and refactor safely.

  5. 5

    Use “Paste JSON as Code” to generate TypeScript interfaces from pasted API JSON, enabling strong typing even without provided types.

  6. 6

    Debug with breakpoints and variable inspection for Node scripts, then switch to Chrome debugging with an Angular launch configuration on localhost:4200 for browser-context issues.

  7. 7

    Manage Git directly in the editor with the Git tab (commit, rollback, revert, partial staging) and add GitLens for hover-based commit history and authorship context.

Highlights

Ctrl+P turns the command palette into the main navigation tool, including filename search across the workspace tree.
Rename symbol (F2) updates every reference across the project, offering a safer alternative to text-based find-and-replace.
“Paste JSON as Code” can transform a pasted JSON API response (example: Twitter API) into TypeScript interfaces for immediate IntelliSense and type checking.
Chrome debugging for Angular can attach to localhost:4200 and run breakpoints before component initialization and on user-triggered events.
GitLens annotates code with author, timestamp, and commit ID on hover, making team changes easier to audit.

Topics

Mentioned

  • Mike Moreland
  • John Papa
  • VS Code
  • NG
  • NPM
  • VS
  • Git
  • API
  • JSON
  • TS
  • Ctrl
  • F2
  • Ctrl+K
  • Ctrl+P
  • Ctrl+Space
  • Ctrl+K Z