Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

VS Code Multi-Cursor Magic

March 12, 2026

If you're still manually renaming variables one by one, your life is about to get much easier. In VS Code, you can hit Cmd+D (or Ctrl+D) to select the next occurrence of whatever word your cursor is on. Keep hitting it to grab more, then type once to edit them all simultaneously.

If you want to grab every single instance in the file at once, Cmd+Shift+L is your best friend. This trick is perfect for those quick refactors where you don't want to open a full find-and-replace dialog.