I was recently hoping Sublime Text's Vintage (vi-emulation) mode would allow me to do a search and replace over specified lines, one of my favorite time-savers from VIm. You know, something like...

:212,216 s/combobox/varTemp/g

No dice. I typed it, and SB2 stood there, looking at me. Dumbly, I might add.

But I thought I remembered it could do multiple cursors:
The shortยญcuts

To enable multi-selection, you have sevยญeral options:

* Press Ctrl + click (Mac is Cmd + click) in each region where you require a
cursor.
o this adds curยญsors wherยญever you click
* Select a block of lines and then press Shift + Comยญmand + L.
o adds curยญsors after your highยญlighted block
+ use the right arrow on keyยญboard to start typยญing after highยญlighted
block (and not erase what is highlighted)
* Place the curยญsor over a parยญticยญuยญlar word, and press Control/Command + D repeatedly
o to select addiยญtional occurยญrences of that word.
* Alt+F3 on Winยญdows, (or Ctrl+Command+G on the Mac)
o adds an addiยญtional curยญsor at all occurยญrences of a word by typยญing


Look, that's essentially regular expressions for dummies. It's really really cool. Don't get me wrong. And there are times I'll be using this instead of regexp. But, at the same time, I'll be learning a lot less about regexp doing things this way.

Oh, and it doesn't play especially nicely with Vintage's command mode.

Regardless, score 1 more for ST2.

Labels: , ,