DEV Community

Toolloom
Toolloom

Posted on • Originally published at toolloom.com on

The VS Code Multi-Cursor Magic

If you're manually changing the same variable name or property across several lines, you're wasting time. VS Code has magic hands! Highlight the first instance, then hit Ctrl+D (Windows/Linux) or Cmd+D (Mac) repeatedly to select the next identical occurrence. Now you can edit all of them simultaneously. For non-sequential edits, hold down Alt (Windows/Linux) or Option (Mac) and click wherever you want a new cursor. It’s a huge time saver for quick refactoring and cleaning up boilerplate.

Top comments (0)