To the contrary, I find multiple selections - especially vertical ones - to be quite useful. I use them when I have a block of code that is fairly similar and I want to change some aspect of it. So doing something like changing:
list.add(3);
list.add(4);
list.add(5);
to:
list.insert(3);
list.insert(4);
list.insert(5);
Yeah, I know there's search and replace. And you can use visual line mode in Vim to select those lines and then when you type : it inserts the range and you can search/replace from there. It's nice and powerful since you can use a regex (although you have to use Vim's shitty regex format). But it's not as nice as having multiple selections and deleting/typing into them all at once, while watching the result of every keystroke as it happens.
In this case, you could get the exact same effect using visual block mode and editing all three lines at once, but I see what you mean. Multiple cursors is certainly more tactile than using the s ex command. Still I don't find that these situations arise often enough to make multiple cursors a killer feature.
Oftentimes, the word I want to change is not perfectly lined up. Being able to put cursors on each line and ctrl-<right-arrow> to skip to the period lets me line everything up nicely.
Multiple cursors is easy to use without spending weeks staring at a cheat sheet for your text editor. Yes, vi has some crazy things you can do when you learn it, but I never seen a real world example that couldn't be done just as well with multiple cursors in Sublime.
I'd probably middle-click to select a region that spans those lines, then press <home> followed by <ctrl>-<right arrow>. That way I know I'm not changing copies of and outside of the specific region I'm looking at and intend to change.
8
u/im-a-koala May 07 '16
To the contrary, I find multiple selections - especially vertical ones - to be quite useful. I use them when I have a block of code that is fairly similar and I want to change some aspect of it. So doing something like changing:
to:
Yeah, I know there's search and replace. And you can use visual line mode in Vim to select those lines and then when you type
:it inserts the range and you can search/replace from there. It's nice and powerful since you can use a regex (although you have to use Vim's shitty regex format). But it's not as nice as having multiple selections and deleting/typing into them all at once, while watching the result of every keystroke as it happens.