VS Code Keyboard Shortcuts That Actually Save Time (Not Just the Obvious Ones)

VS Code Keyboard Shortcuts That Actually Save Time (Not Just the Obvious Ones)

Photo by Billy Joachim 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 each one and retype it. Every. Single. One. I watched him do this for like three occurrences before I leaned over and hit F2 and renamed all of them at once in about half a second. The look on his face was priceless. That moment reminded me that VS Code keyboard shortcuts aren't just a "nice to know" thing — they're the difference between feeling like you're fighting your editor and feeling like it's actually working with you.

I've been using VS Code daily for years now, and I still occasionally stumble onto something I didn't know existed. So let's skip the absolute basics (yes, everyone knows Ctrl+S saves) and get into the stuff that genuinely changes how fast you work.

Multi-Cursor Editing Is Underused and Incredibly Powerful

Most people know you can hold Alt and click to place multiple cursors. That's fine. But what most people miss is Ctrl+D — it selects the next occurrence of whatever word your cursor is on. Hit it three times and you've got three cursors, each on the same variable name. Now type and you're editing all three at once. Way faster than find-and-replace for small, scoped changes.

Even better: Ctrl+Shift+L selects ALL occurrences in the file at once. Combined with F2 for symbol renaming (which works across files in your project, not just the current one), you've got two different tools for two different jobs. F2 when you need cross-file, language-aware renaming. Ctrl+Shift+L when you just need dumb text matching in the current file fast.

The Command Palette Is Your Best Friend

Honestly, if there's one habit worth building, it's reaching for Ctrl+Shift+P (or Cmd+Shift+P on Mac) before anything else when you don't know a shortcut. The Command Palette searches everything — settings, commands, extensions, even recently opened files. I use it probably 40+ times a day without thinking about it.

Here's an insider trick though: if you hit Ctrl+P instead, you get quick file open. But if you type @ inside that same prompt, it turns into a symbol navigator for the current file. And if you type : followed by a number, it jumps to that line. So Ctrl+P then :142 gets you to line 142 instantly. Much faster than scrolling, and faster than Ctrl+G (though that works too).

Navigation Shortcuts That'll Change How You Move Around Code

This one I genuinely didn't discover until maybe year three of using VS Code, which is embarrassing: Ctrl+Tab cycles through open editor tabs, but Alt+Left and Alt+Right navigate your cursor history — like a browser's back and forward buttons, but for your code. Clicked into a function definition to check something? Hit Alt+Left and you're back where you were. No hunting through tabs.

Speaking of definitions — F12 goes to a symbol's definition, but Alt+F12 opens it in a peek window inline without leaving your current spot. That's massive when you're deep in debugging and just want to quickly check what a function does without losing your place.

And for moving between problems in your code, F8 jumps to the next error or warning. You don't need to squint at the Problems panel. Just keep hitting F8 and fix as you go.

The Terminal Shortcut People Forget Exists

I've watched developers minimize VS Code, go to a separate terminal window, run a command, then come back. Every time I see it I age slightly. Ctrl+` (that's the backtick key) toggles the integrated terminal. Open it, close it, open it again — same keystroke. And if you need multiple terminal instances, Ctrl+Shift+` creates a new one.

Reformatting and Cleanup Shortcuts

This depends a bit on your formatter setup, but Shift+Alt+F formats the entire document. If you've got Prettier or ESLint hooked in, this runs it immediately. No right-clicking, no hunting through menus. On Mac it's Shift+Option+F.

Here's a lesser-known one: Ctrl+K Ctrl+F formats only the currently selected code. Useful when you don't want to reformat a whole file someone else touched — keeps your git diff clean. I've seen this save awkward conversations in code review more than once.

One Insider Trick Most People Skip: Custom Keybindings

VS Code's default shortcuts are solid, but you can override anything. Hit Ctrl+K Ctrl+S to open the Keyboard Shortcuts editor. From there you can search by command name and reassign to whatever feels natural. I personally remapped editor.action.copyLinesDownAction to something easier to hit — the default Shift+Alt+Down always felt awkward to me.

You can also edit the raw keybindings.json directly if you prefer. Something like this:

[
  {
    "key": "ctrl+shift+d",
    "command": "editor.action.copyLinesDownAction",
    "when": "editorTextFocus"
  }
]

Just be aware of conflicts — VS Code will warn you if you're stomping on something else, but it won't stop you.

Quick Reference for Everything Above

Rather than scatter these across a cheat sheet you'll never find again, here's the condensed version in one place:

  • Ctrl+D — select next occurrence
  • Ctrl+Shift+L — select all occurrences
  • F2 — rename symbol across project
  • Ctrl+Shift+P — Command Palette
  • Ctrl+P then :142 — jump to line 142
  • Alt+Left / Alt+Right — navigate cursor history
  • Alt+F12 — peek definition inline
  • F8 — jump to next error/warning
  • Ctrl+` — toggle integrated terminal
  • Shift+Alt+F — format document
  • Ctrl+K Ctrl+F — format selection only
  • Ctrl+K Ctrl+S — open keyboard shortcuts editor

The shortcuts that stick are the ones you reach for when you actually need them, not the ones you memorized from a list. So pick two or three from here that match something you do constantly, and just use those for a week. They'll become muscle memory faster than you'd expect. Hope this saves you some time — and maybe a few gray hairs in code review.

Related: VS Code Tips and Tricks That Actually Save You Time (No Fluff)

๋Œ“๊ธ€

Zoho IMAP Settings: The Complete Fix When Your Email Stops Syncing

Quick Summary Zoho IMAP breaks more often than it should, and the error messages are genuinely useless. The fix is usually a combination of using the right server address, enabling IMAP inside Zoho Mail's settings, and generating an app-specific password. This guide covers the exact steps for Outlook, iPhone, Thunderbird, and Android so you stop going in circles. Photo by Fotis Fotopoulos on Unsplash So your Zoho Mail stopped syncing. Emails aren't coming in, your phone shows a spinning indicator forever, or Outlook throws some vague authentication error and you have no idea what changed. Sound familiar? I've seen this exact situation probably thirty times across different clients, and every single time the person swears they didn't change anything. And honestly? They usually didn't. Zoho changed something on their end, or an app update reset a setting, or someone enabled two-factor authentication without realizing what that does to third-party mail clients. The...

Zoho Mail IMAP Configuration: Exact Settings That Work First Time

Quick Summary Getting Zoho Mail IMAP to work in Outlook or Thunderbird is not as straightforward as Zoho's docs make it sound. The port numbers, SSL settings, and app password requirements catch almost everyone off guard the first time. Here are the exact settings and steps that actually work, without the back-and-forth with support. Photo by Fotis Fotopoulos on Unsplash Last month I spent almost two hours on a Friday afternoon helping a new employee get Zoho Mail working in Outlook. Two hours. The settings look simple on paper — and honestly, they are — but there are two or three specific things that Zoho just does not make obvious, and if you miss any one of them, you get a generic authentication error that tells you absolutely nothing useful. Sound familiar? The thing is, I've set up Zoho IMAP maybe forty times across different clients and different mail apps. Outlook, Thunderbird, Apple Mail, even some third-party Android clients. And every single time, someone new come...

์ด ๋ธ”๋กœ๊ทธ ๊ฒ€์ƒ‰

Magnesium Glycinate vs Magnesium Citrate: Which One Actually Fixed My Sleep

Quick Summary I spent months trying different magnesium forms after my sleep fell apart, and the difference between glycinate and citrate is way bigger than I expected Glycinate is the gentler, slower option great for sleep and anxiety, while citrate works faster but comes with some digestive surprises nobody warns you about If you're confused about which one to take, this breaks down exactly what each form does and who should actually be using it Photo by Anshu A on Unsplash About two years ago I hit a wall. I was waking up at 3am every single night, my legs felt restless, and I was grinding my teeth so bad my jaw hurt in the morning. My doctor ran some basic labs, everything came back "normal," and I left that appointment feeling completely dismissed. A friend of mine — she's really into functional nutrition — casually mentioned that I might just be magnesium deficient. I kind of rolled my eyes at first. It sounded like one of those wellness buzzwords people throw...
↑