Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Speed Up Your Refactoring with Multi-Cursors
May 10, 2026
One of the most underrated features in VS Code is the ability to edit multiple lines at once without a complex find-and-replace. If you highlight a word and hit Cmd+D (or Ctrl+D), it selects the next occurrence. Keep hitting it to grab every instance you need, then just start typing to change them all simultaneously.
It’s incredibly satisfying and prevents those annoying "I missed one spot" bugs when renaming local variables. If you need to select all occurrences at once, use Cmd+Shift+L instead. Just be careful—it’s powerful enough to change things you didn't intend if your variable names are too generic!