Home Download Buy Blog Forum Support

space terminated regexe[S] for quickpanel multiselect filter

Re: space terminated regexe[S] for quickpanel multiselect filter

Postby SteveCooperOrg on Wed Feb 25, 2009 1:56 pm

Some ideas, which I hope might help;

First, my experience with the quick panel has been with file lists and command lists. As yet, I've not needed to do multiple selection of the list; can you explain what your scenario is? The quick panel doesn't do multiple selection, so I can't quite see what your situation is.

I'm not entirely convinced yet of the need for regex. My experience is that the behaviour of caps is great -- It's better than regex for filtering a great deal of the time. Certainly, if I know that I'm looking for a file called 'AbstractExampleReader.cs' then I'd much prefer to type "ABEXRE" than "Ab.*Ex.*Re.*". The regex is much harder to compose.

Case is also an issue. lcase currently means one kind of matching, and ucase another. What do you do with mixed-case regex? How do you indicate the start of a regex? Whether it's case-sensitive? Sublime uses a toggle button to turn regex on and off, so that'd need to appear somewhere in the quickpanel, making it a little less 'quick' and more a full tool window.

I like the idea of a 'not' operator, though. I haven't needed it yet, though.

Anyway, not a coherent post, I know -- just trying to explore some of the issues.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: space terminated regexe[S] for quickpanel multiselect filter

Postby SteveCooperOrg on Thu Feb 26, 2009 12:10 pm

sublimator wrote:>>> Sublime uses a toggle button to turn regex on and off, so that'd need to appear somewhere in the quickpanel, making it a little less 'quick' and more a full tool window.

A flagged option would suffice as above


So it'd be up to the plugin developer, not the user, to turn regex matching on an off? I think I'd prefer the user to have a choice.

sublimator wrote:Anyway, regex would be nice but mainly I'd like some NOT/OR (OR is free with regex) You may not need the full power of regex most of the time but every now and then it may come in handy.


I think this is probably a separate feature, then. How about this as a set of operators that go in-between specifiers;

- | -- or. As in "cake || death" (includes everything with either 'cake' or 'death')
- ! - not, as in "lap ! flap" (matches 'lap' but not 'flap')
- #~ - regex match, eg " =~ a.b.c" matches "axbxc"
= !~ - regex does-not-match eg "=~ a.. !~ a.a" matches "abc" but does not match "aaa"

Just some ideas, again...
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: space terminated regexe[S] for quickpanel multiselect filter

Postby jps on Thu Feb 26, 2009 12:20 pm

The quick panel is presently implemented by transforming what the user enters into a set of regexes, all of which must match each string to have it present in the result list.

Adding negative matching would be a fairly straightforward addition, although I'd likely have it indicated by adding a `-` prefix to a search term, a la Google.

Allowing explicit regex terms isn't too bad in theory, but I suspect there are a few complications. I would think the best method of integrating them in would be to add an escape, so that a regex term can be given by surrounding it with @ symbols, or something along those lines. It makes the parsing more complex (i.e., regexes need to be able to contain spaces, as well as escaped @ symbols).
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests