Home Download Buy Blog Forum Support

Multiple selection from find

Multiple selection from find

Postby p.f.moore on Sat Mar 16, 2013 10:01 am

I have a file with numbered lines ("1. Line of text..."). By doing a regex search for ^\d*\. I can find the line number. What I want to do now is to select some of the line numbers, but not all (I know about "Find all" to select all of them. Something like Ctrl-D and Ctrl-K Ctrl-D, but for the current search regexp.

I've looked through the various documentation, and searched the web, but couldn't find anything. Is there a key binding, command or plugin I've missed? If not, I guess I get to write my first plugin :)

Thanks,
Paul.
p.f.moore
 
Posts: 10
Joined: Thu Mar 14, 2013 5:10 pm

Re: Multiple selection from find

Postby adzenith on Sat Mar 16, 2013 7:17 pm

You could do it with this:
https://github.com/colinta/SublimeMarkAndMove
Find all, mark all, then travel through the marks and clear the ones you don't want. Finally, select all marks.
I think you could do the same with the built-in bookmarks, actually, but they're less sweet. :P
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

Re: Multiple selection from find

Postby adzenith on Sat Mar 16, 2013 7:18 pm

I agree, though, that it would be awesome if Cmd+D could use the actual find string (including regexes) rather than just whatever's selected.
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 32 guests