Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expand multiple selection to all suggestions (boxes,hints) in Sublime Text 2

I am wondering if there already exists a way to expand selection to all areas suggested by Sublime Text 2 boxes, so one does not have to keep pressing Ctrl-D and sometimes Ctrl-K-D as shown in How do I skip a match when using Ctrl+D for multiple selections in Sublime Text 2?

90% of time the boxes on the screen are exactly what I want to multiple select, and it would be very handy if there was a one key option to do so.

for example, if you have

foo(2,42,23,2,2)

and you click on the first 2, the boxes will be shown around only the three single 2s. These I would like to select with a single command/macro.

If you go with Ctrl-D you have to skip the 2s in 42 and 23 with Ctrl-K-D.

If nothing like this exists, any pointers on writing a plugin for such functionality would be much appreciated.

UPDATE: I've gotten a great suggestion to use Alt+F3, which is awesome for making changes in the whole file. However, it would be also beneficial to limit the scope of multiple select to current visible page or tag or brackets or something else.

like image 297
Sint Avatar asked Jan 10 '13 11:01

Sint


1 Answers

In the example given "foo(2,42,23,2,2)" if you just want to multi-select the single '2's and exclude the '23' - you can just put your cursor after one of the ',2'| occurances, then without selecting any text press [CTRL]+[D] or [ALT]+[F3]

like image 149
David Larsen Avatar answered Oct 10 '22 17:10

David Larsen