Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Supercharge Refactoring with Multi-Cursors

April 30, 2026

If you're still manually renaming variables one by one, your workflow is about to get a lot faster. In VS Code, hitting Cmd+D (or Ctrl+D on Windows) while a word is selected will automatically find and select the next occurrence. You can keep hitting it to highlight as many as you need, then type once to edit them all simultaneously.

It’s perfect for those quick refactors where a full "Rename Symbol" feels like overkill. Just be careful not to select instances inside strings or comments by mistake—though you can always hit Cmd+U to undo the last selection if you accidentally go too far.