Photo by Ferenc Almasi on Unsplash
So I was pair programming with a junior dev last year and watched him spend a solid three minutes hunting through VS Code menus trying to find the format document option. I didn't say anything for a bit — just watched — and then finally said "hey, hit Ctrl+Shift+P." His face. I'll never forget it. He had no idea the VS Code Command Palette existed, and honestly, I get it. Nobody sits you down and explains it. You just kind of stumble into it eventually.
But here's the thing — the Command Palette isn't just a fancy search box. It's basically a keyboard-driven interface to almost every feature in VS Code, including ones buried so deep in settings menus you'd never find them otherwise. Once it clicks, you stop reaching for your mouse constantly. Your workflow just... tightens up.
The Basics First (But Stay With Me)
Open it with Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac. That's your entry point to everything. You'll see a text box with a > prefix already in it — that > is what tells VS Code you're looking for commands specifically. If you delete it and just type, you're actually switching into file search mode, which is its own useful thing.
Now here's where it gets tricky. A lot of people don't realize the Command Palette has different modes depending on what prefix you use:
>— Run commands (the default)- No prefix — Quick file open (same as
Ctrl+P) @— Jump to a symbol in your current file#— Search symbols across your whole workspace:— Go to a specific line number
That @ one is something I use constantly in long files. Instead of scrolling through 400 lines of JavaScript to find your function definition, just hit Ctrl+Shift+P, clear to get a plain box, type @ and start typing the function name. Done. You can also group symbols by type using @: which gives you a nicely categorized view — classes, functions, variables. Super handy when you've inherited someone else's spaghetti code. Not naming names.
Commands Worth Memorizing
Once you're in the palette with the > prefix, here are the ones I reach for almost every single day:
Format Document — Type Format Document and pick your formatter. Or better yet, just set a keyboard shortcut for it. But the palette version is great when you're in a file type you don't format often and you're not sure if your shortcut will work.
Reload Window — Type Developer: Reload Window. This is my go-to when an extension starts acting weird or IntelliSense decides to take the day off. Way faster than closing and reopening VS Code, and it doesn't mess with your open tabs.
Toggle Terminal — Terminal: Toggle Terminal or just learn the shortcut Ctrl+`. But I mention it here because the palette version lets you also do Terminal: Create New Terminal without touching the mouse.
Open Settings (JSON) — This one's big. Type Preferences: Open User Settings (JSON) and you'll get your raw settings.json file instead of the GUI. If you're doing anything non-trivial with VS Code settings, you want to be in the JSON file. The GUI is fine for beginners but it hides a lot of stuff.
The Insider Tricks
Alright so here's the stuff that doesn't show up in most "VS Code tips" posts.
Run last command again. After you run a command from the palette, it stays at the top of your recent list. So the next time you open the palette and just hit Enter immediately — without typing anything — it reruns whatever you did last. I use this constantly when I'm running something like ESLint: Fix all auto-fixable Problems over and over while cleaning up a file.
Multi-command workflows via tasks. You can actually wire the Command Palette into custom task runners. In your .vscode/tasks.json, you can define tasks and then call them via Tasks: Run Task from the palette. So instead of remembering 12 different npm scripts, you just open the palette, type "Run Task," and pick from a human-readable list you've already set up. I've done this on team projects so that even people who are new to the repo can run common operations without reading a wall of README text.
Here's a quick example of what a simple task entry looks like:
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Dev Server",
"type": "shell",
"command": "npm run dev",
"group": "build"
}
]
}
Now that's surfaced in your Command Palette as "Start Dev Server." Clean.
One More Thing About Extensions
Every extension you install dumps its own commands into the palette too. This is both great and overwhelming. I've found myself discovering features of extensions I've had for months just by typing the extension name into the palette and seeing what comes up. Seriously, try it with whatever extensions you use. GitLens is a good example — type GitLens and you'll see like 40+ commands you probably didn't know existed.
Also worth knowing: you can manage extensions directly from the palette. Extensions: Install Extensions, Extensions: Disable All Installed Extensions (great for debugging whether an extension is causing a problem), Extensions: Show Recommended Extensions — all there.
Honestly, the Command Palette is one of those things where once you really internalize it, going back to mouse-driven VS Code feels like using a computer with oven mitts on. It's not a magic bullet that'll make you a 10x developer or whatever, but it does chip away at the constant friction of navigating a complex editor all day. And that adds up.
If you're just starting out with it, set yourself a reminder to open it first anytime you're about to reach for the mouse in VS Code. Give it two weeks. You'll be surprised what you stop forgetting to look for. Hope this saves you some clicking.
Related: VS Code Tips and Tricks That Actually Save You Time (Not the Obvious Ones)
๋๊ธ
๋๊ธ ์ฐ๊ธฐ