

While you can use the regular find-and-replace dialog, but I find this much more convenient and intuitive. This will prevent you from starting allllllll over, which is especially helpful when you are selecting a lot of instances. Luckily, Command+u will undo the last multi-cursor operation. You might end up selecting one or more too many instances of the desired word or phrase.

Then, you just type the replacement, and all instances are updated with each keystroke! Alternately, you can add a cursor to all occurrences of the current selection with Command+Shift+L. If you have a word highlighted, you can select the next occurrence of that word by pressing Command+d, then repeat until you have all instances of the word selected. It’s very handy for editing data files, such as CSV, and it’s also useful when extracting data from log files. This is very handy for aligning things in columns since you can skip over white space and words using Ctrl and/or Alt as you would with a single cursor. Just hold down Command+Alt and use the Up and/or Down arrows to add new cursors above or below, respectively. If you would like to edit a number of lines at the column position, you can add additional cursors above or below the initial cursor. I believe the middle mouse button can be configured so you don’t need to hold down the Alt key. Assuming you already have your first cursor placed, you just hold down the Alt key, click where you would like to add another cursor, and then repeat as many times as you’d like. The most intuitive way to start adding multiple cursors is with the mouse.

Three Ways to Add Cursors The basic mousey way Once you have your cursors placed, you continue editing, and all operations will be applied to all cursors simultaneously. While multi-cursor mode can be used for column-mode editing, it is much more powerful! It’s column-mode on steroids! Basically, you can place as many cursors in as many places as you want in a single editor view. Here are some tips for getting started! What Is Multi-Cursor Mode? Visual Studio Code has been gaining popularity and has replaced Sublime Text as my editor of choice, and it brought along many of my favorite features of Sublime, including its multiple cursor magic, which is especially great for refactoring.
