Sublime Forum

Multiple selection from find

#1

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

Thanks,
Paul.

0 Likes

#2

You could do it with this:
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. :stuck_out_tongue:

0 Likes

#3

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.

0 Likes