Photo by Aidan Granberry on Unsplash
So I was pair programming with a junior dev last year, and every time he wanted to rename a variable he'd manually highlight it, right-click, hit rename symbol... and just watching it was physically painful. Not because he was doing anything wrong — it works fine — but because there's a way to do it in about half a second and I've just had it burned into muscle memory for so long I forgot it wasn't obvious. That's kind of the whole problem with VS Code keyboard shortcuts. Everyone learns like ten of them, uses Ctrl+S and Ctrl+Z religiously, and then leaves about 80% of the editor's speed on the table.
Let me walk you through the ones that actually changed how fast I work — not the ones on every "top 10" listicle that just tells you Ctrl+C copies things.
The Command Palette Is Your Best Friend (Seriously, Use It More)
If you're not using the Command Palette constantly, start now. Everything lives here.
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
You can open settings, run tasks, change your color theme, toggle word wrap — all without touching the mouse. But here's a trick most people miss: if you just hit Ctrl+P instead, you get the file finder. Type a filename and jump straight to it. Add a : after the filename and you can jump to a specific line number in that file in one shot. Like app.js:142. That one move alone saves me probably 20 context switches a day when I'm debugging.
Multi-Cursor Editing — The One That Makes People Gasp
I demo this one at least twice a year and someone always goes "wait, how did you do that?"
Alt+Click — place multiple cursors anywhere you wantCtrl+Alt+Down / Ctrl+Alt+Up — add a cursor on the line below or aboveCtrl+D — select next occurrence of the current selection
That last one is the real workhorse. Highlight a word, keep hitting Ctrl+D to grab each next occurrence, then type your replacement. It's like a surgical find-and-replace that only hits the exact spots you want. Way better than global replace when you're dealing with a function name that's used in different contexts across the same file.
Honestly, this is the shortcut that separates people who "know VS Code" from people who actually use it efficiently.
Moving and Copying Lines Without Selecting Anything
This sounds minor but it's one of those things you'll use fifty times a day once you know it.
Alt+Up / Alt+Down — move the current line up or downShift+Alt+Up / Shift+Alt+Down — duplicate the line above or below
No selecting. No cutting. Just your cursor sitting anywhere on the line and you just... move it. I can't count how many times I've refactored a block of conditions or reordered import statements using nothing but these two shortcuts. It feels almost too simple but it's genuinely one of the highest-frequency things I do.
The Rename Symbol Shortcut (Going Back to My Coworker)
F2 — rename symbol across all usages in the file (and often across files, depending on the language extension)
Click on a variable or function name, hit F2, type the new name, hit Enter. Done. In TypeScript and Python especially, this is incredibly reliable because the language server knows the actual scope — it won't rename a completely different variable that happens to share the name in another function. This is the one I should have shown my coworker on day one.
Quick Fix and Auto-Import — The Underrated Productivity Hack
Ctrl+. (that's Ctrl + period)
When VS Code underlines something with a squiggly, put your cursor on it and hit this. You'll get a context menu of suggested fixes — add a missing import, implement an interface, wrap something in a try/catch. In TypeScript projects especially, auto-import via this shortcut is a total game changer. Stop typing import statements at the top of your file by hand like it's 2015.
Insider Trick #1: Zen Mode for When You Actually Need to Focus
Ctrl+K Z — toggle Zen Mode
This hides literally everything except your code. No sidebar, no tabs, no status bar. Full screen, just text. I use this when I'm writing something complex that needs actual concentration. It's a two-key chord — press Ctrl+K, release, then press Z. Hit Escape twice to exit. Sounds gimmicky but once you've used it for a hard debugging session you'll get it.
Insider Trick #2: Open the Terminal Without Leaving VS Code (Obviously) — But Here's the Trick
Ctrl+` — toggle integrated terminal
Yeah, you probably knew that one. But here's the part people miss: you can have multiple terminal instances and split them side by side. Hit the split button in the terminal panel, or run Ctrl+Shift+5 to split the current terminal. When I'm running a dev server in one pane and running tests in another, I never need to alt-tab to a separate terminal window. Everything stays in one place. It sounds small but the cognitive overhead of switching windows constantly is real — keeping it all in VS Code keeps me in flow.
A Few Quick Ones Worth Mentioning
I won't belabor these but they're worth knowing:
Ctrl+/ toggles line comments. Put your cursor on a line or select multiple lines and it just works. Ctrl+Shift+K deletes the entire current line without you having to select it first. And Ctrl+B toggles the sidebar — super useful when you want more horizontal space without going full Zen Mode.
Oh, and if you want to see every shortcut at once: Ctrl+K Ctrl+S opens the full keyboard shortcuts editor where you can search, rebind, and export your settings. Worth spending 20 minutes in there at least once to customize things to how your brain actually works.
Alright — I know some of these you've probably seen before, but I'd bet there were at least two in here you hadn't used yet. Start with Ctrl+D for multi-select and F2 for rename. Those two alone will noticeably change your editing speed within a week. Hope this saves you some time.
Related: VS Code Tips and Tricks That Actually Save You Time (Not Just the Obvious Ones)
๋๊ธ
๋๊ธ ์ฐ๊ธฐ