DEV Community

Toolloom
Toolloom

Posted on • Originally published at toolloom.com on

Boost your editing speed with VS Code's multi-cursor power

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.

Top comments (0)