Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Speed Up Your Editing with VS Code's Multi-Cursor Magic

May 25, 2026

If you find yourself manually editing ten lines of similar code one by one, stop right there! VS Code has a brilliant shortcut to help you edit multiple lines simultaneously. Simply select a word or a variable and press Ctrl+D (Windows/Linux) or Cmd+D (macOS) to select the next occurrence of that exact text.

Keep pressing it to select as many as you need, and you'll get a cursor at every single one. From there, you can type, delete, or navigate all of them at once. If you want to select all occurrences instantly, use Ctrl+Shift+L or Cmd+Shift+L. It saves so much tedious typing time.