Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Boost your editing speed with VS Code's multi-cursor power
May 20, 2026
If you're still manually renaming five instances of a variable in a file, it's time to embrace `Ctrl+D` (or `Cmd+D` on Mac). Simply highlight the word you want to change, and press the shortcut to automatically select the next occurrence. Each press adds a new cursor, allowing you to edit, delete, or replace all matching instances simultaneously.
If you accidentally select one too many, don't worry—you can undo the last selection with `Ctrl+U` (`Cmd+U` on Mac) without losing your other cursors. It's a quick, low-friction alternative to a full find-and-replace when you just need to make a localized edit.