Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Instant Refactoring with Multi-Cursor Magic in VS Code

February 3, 2026

Stop manually changing the same variable name multiple times! One of the fastest ways to edit code in VS Code is using multi-cursor selection. To select the next occurrence of the currently highlighted word, use `Ctrl+D` (Windows/Linux) or `Cmd+D` (Mac) repeatedly. You can then edit all selected instances simultaneously. If you need arbitrary cursor placement across different lines, hold `Alt` (Windows/Linux) or `Option` (Mac) and click wherever you want a new cursor to appear. This technique dramatically speeds up quick, localized refactoring.