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
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: , ,