Match At Beginning for LFB and Visual Filters

Features wanted...
Post Reply
Evolve
Posts: 354
Joined: 27 Feb 2020 09:48

Match At Beginning for LFB and Visual Filters

Post by Evolve »

We have this beautiful option

Code: Select all

Configuration | Filters & Type Ahead Find | Type Ahead Find | Match at beginning
Unfortunately, it only works for Type Ahead Find and not even always here, because if I tick Redirect typing to LFB, this option is ignored.
How about moving it on top and applying for all types of filters?

suggestion.png

PS. Or could you please at least make LFB respect this option when the request is redirected from Type Ahead Find

PPS. After moving the option on top you can still make it work only for some filters.
suggestion2.png
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 66097
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Match At Beginning for LFB and Visual Filters

Post by admin »

For now I will add a tweak (applies to LFB and Visual Filters):

Code: Select all

VFMatchAtBeginning=1

Evolve
Posts: 354
Joined: 27 Feb 2020 09:48

Re: Match At Beginning for LFB and Visual Filters

Post by Evolve »

I've lost my confidence in this approach. Sometimes I do need to search in the middle of the string and in those cases I have to put * not only at the beginning, but at the end as well and until I do so I don't see the results, so I have to press two stars **, then "left" and then start typing in between which is actually impossible with redirection so I have to go to LFB manually and do all that stuff there.

I think a better way than that flag would be to add a special symbol to indicate the beginning/end of the string, like ^ $ in regex except I think one symbol would be enough.

^word - word at the beginning
word^ - word at the end
word - word anywhere

PS.Maybe not ^ but one of those ones that can't be in a file name, except * obviously.
How about making one of those \/:?"<>| an "anti-star"?
|beginning
end|

PPS. Actually no, it wouldn't work for exact same reason, I can't move the cursor in "Type Ahead Find".
So there should be 2 distinct symbols for beginning and end.
|beginning
:end
Or maybe just stick with well-known regex ^ $ by putting them into LFB setting "Enable extended pattern matching" and escape if need be.

admin
Site Admin
Posts: 66097
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Match At Beginning for LFB and Visual Filters

Post by admin »

Use the standard setup (VFMatchAtBeginning=0) and add * to the end of your pattern to make it match at beginning.

Evolve
Posts: 354
Joined: 27 Feb 2020 09:48

Re: Match At Beginning for LFB and Visual Filters

Post by Evolve »

So, it's already there, Nice! Thanks, I had a feeling that I was missing something.

admin
Site Admin
Posts: 66097
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Match At Beginning for LFB and Visual Filters

Post by admin »

Equally you can make it match at the end like this: *pattern

This applies to all wildcard patterns in XY (unless explicitly stated otherwise in the settings): The automatic internal asterisks at both ends are only added if the pattern itself does not have any wildcards (*?).

Post Reply