Quick search results

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
LuP
Junior Member
Junior Member
Posts: 6
Joined: 2009-07-16, 08:38 UTC

Quick search results

Post by *LuP »

Hello,

when in "Quick search" options BOTH "Beginning (name must start..." and "Ending (last char...)" are NOT checked, IOW when quick search filters all files which have the mask typed ANYWHERE in the file name:

would it be possible to sort the matching names in the order the earlier mask in the file name is found the "higher" (earlier) the file name appears ("higher" in the result list) (maybe depending on a option checked in a dialog box) in the result list?

This would cause that files which start with the "quick search letters" will appear first, then those whose mask is found inside the file name...

E.g. files:

aab.txt
aba.txt
baa.txt

quick search: "ba"

will produce:

baa.txt
aba.txt

and not that contemporary:

aba.txt
baa.txt

For those, who are used to have "Beginning (name must start with first typed letter)", the behavior described above would be very handy as files which start with the character typed will STILL appear first in the list of matching files...

Thank you in advance.

Best regards,

LuP
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Quick search results

Post by *Usher »

Quick search doesn't change sort order. If you want to reorder list with any key press, it won't be quick.

I think it would be better to add shortcut keys to change matching on the fly, f.e. using the following letters (the same letters as in config are already in use):
- Ctrl+G (Ctrl+B is in use) to switch matching from the beGinning;
- Ctrl+E (Ctrl+D is in use) to switch matching for Ending.
In such case you can start with "matching from the beginning" turned on in config and turn it off after first keys pressed. The selection will be extended but the cursor will stay on the match you expect to see.

Example (cursor position displayed in red):

aab.txt
aba.txt
baa.txt
bab.txt

With filtering and matching from the beginning turned on, quick search "ba" will display:
baa.txt
bab.txt

Now press Ctrl+G and you should see:
aba.txt
baa.txt
bab.txt

Now press Ctrl+S and you should see:
aab.txt
aba.txt
baa.txt
bab.txt

Edit: Changed proposed shortcut keys
Last edited by Usher on 2018-08-26, 11:43 UTC, edited 1 time in total.
Andrzej P. Wozniak
Polish subforum moderator
LuP
Junior Member
Junior Member
Posts: 6
Joined: 2009-07-16, 08:38 UTC

Re: Quick search results

Post by *LuP »

Hello,

the UI described by Usher seems to me a bit "cumbersome" - when I suppose that files starting by a pattern will appear first in a list, it takes some time to release that I have to press Ctrl+B to re-sort the result list.

Also, I don't think that re-ordering quick search result would consume much time - compare to IDEs or internet browsers and their "whisperers" (suggestion list combos) while typing program code or typing something into the address bar.

Anyway, the choice of re-ordering result list (and it's speedness) IMHO should be user's responsibility - I suggest to add the following lines into the "Configuration" / "Quick search" dialog box:

- a check box "Sort matching files by occurrence of the pattern",
- an edit box "Limit number of sorted files to (0 = unlimited) [...]".

I tried to show both here: [img]https://preview.ibb.co/d595Cp/Clipboard05.jpg[/img].

Best regards,

LuP
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Quick search results

Post by *HolgerK »

It would be a better solution to highlight the matching pattern in the filtered list...

A sorting different than the one selected via tab header looks like a bug.

Regards
Holger
Make our planet great again
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Quick search results

Post by *Usher »

2LuP
I'm afraid that your suggestions are neither quick in search nor quick in implementing…

2HolgerK
That's also good, but why not have both features - yours and mine? Your suggestion is better for short lists, mine - for extremely long ones, with Ctrl+B for flat view used before search. Oh, there's some shortcut conflict, so I change my proposed shortcuts:
Ctrl+G for beGinning, Ctrl+E for Ending are still free to use.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Quick search results

Post by *HolgerK »

Usher wrote: 2018-08-26, 11:39 UTC ...mine - for extremely long ones...
The list will shrink with every matching character you will enter...
Usher wrote: 2018-08-26, 11:39 UTC Oh, there's some shortcut conflict,...
Not every shortcut is active if the quick search windows is shown. Some like <Ins> or <Ctrl+Q> are explicit bypassed from the quick search window to the tc command system, some (like <Ctrl+A>) are not...
Usher wrote: 2018-08-26, 11:39 UTC Ctrl+G for beGinning
As this is supposed to act as a toggle command for a persistent background setting, some indicator would be needed to show the current state.

Another method could be to enter the quick search pattern beginning with some extra char which usually can't be a part of filename. eg:
"ab" would find "ahab.txt"
">ab" not, because the pattern is marked as start from beginning.
The same could also be applied to "ab<." to switch from pattern match ending.
so ">ab<.txt" would only find "ab.txt".

But do we need this really?
If you configure" Start beginning"
entering "*ab.txt" would also find "ahab.txt"...

Btw: there is a command to open the quick search configuration dialog : cm_QuickSearchConfig
If this command could be called while the quick search dialog is open, this would enable you to switch the settings while your are working with quick search:
<shortcut for cm_QuickSearchConfig>, <Alt+B> or <Alt+D>, <Enter>

Regards
Holger
Make our planet great again
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Quick search results

Post by *Usher »

HolgerK wrote: 2018-08-26, 12:25 UTC The list will shrink with every matching character you will enter...
In some cases it's not enough even if you know the exact name to search.
HolgerK wrote: 2018-08-26, 12:25 UTC Not every shortcut is active if the quick search windows is shown. Some like <Ins> or <Ctrl+Q> are explicit bypassed from the quick search window to the tc command system, some (like <Ctrl+A>) are not...
I know, but in this case reusing Ctrl+B may be really misleading.
HolgerK wrote: 2018-08-26, 12:25 UTCAs this is supposed to act as a toggle command for a persistent background setting, some indicator would be needed to show the current state.
Just add buttons around the funnel button for Ctrl+S: a button before funnel (for beginning) and another one after funnel (for ending).
HolgerK wrote: 2018-08-26, 12:25 UTCAnother method could be to enter the quick search pattern beginning with some extra char which usually can't be a part of filename.
True.
HolgerK wrote: 2018-08-26, 12:25 UTCBut do we need this really?
If you configure" Start beginning" entering "*ab.txt" would also find "ahab.txt"...
We can also use ? for a single character and ?* for at least one character to skip. And with ending turned on we can end search sequence with * to disable exact match before ending dot.
Yeah, using wildcards in quick search is really helpful hint.
HolgerK wrote: 2018-08-26, 12:25 UTCBtw: there is a command to open the quick search configuration dialog : cm_QuickSearchConfig
Dialog is distracting (many people will use mouse there),"on the fly" key switch is NOT. I will stay with wildcards…
Andrzej P. Wozniak
Polish subforum moderator
Post Reply