Page 2 of 3

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 14:46
by grindax
.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 14:50
by admin
I don't get it. Example, please.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 14:53
by grindax
.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 14:56
by admin
This example does not add anything new. You can do this now.


I'm losing interest. I stop following this topic now, sorry.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 15:01
by grindax
.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 15:14
by TheQwerty
Don before you bow out please consider this post... (I was typing it while you and grindax continued. :( )
admin wrote:You use "t" to jump to the files starting with "t". Now you want to "match anywhere" from here, right? Say you want to match "app": You type "a"... wham, focus jumps up to the files starting with "a". So the whole "t" thing was pointless.

The ambiguity is that "a" can be a jump letter or the beginning of a multi-character pattern.
See this doesn't seem ambiguous to me but just the way it works. If the timeout has expired focus will jump to the 'a*' items. It will function exactly like TAF does when 'match anywhere' is disabled in that regard.

Given:
a.txt
app.txt
t.txt
tapp.txt

There will be no way to jump to 't' ('t.txt'), let the timeout expire, and then use 'a' to get to 'tapp.txt' instead of it focusing 'a.txt'. If that's what the user is after they should use 'ta'.

That's a sacrifice one would make for this option but I don't see it as ambiguous since the user has to first make the choice to use 'Beginning then anywhere'.



Coincidentally, this is another reason that supporting wildcards in TAF would be awesome since the user could use 't' to get to 't.txt' and then once the timeout expires use '*a' to get to 'tapp.txt'. In this scenario the user has match anywhere disabled - with it enabled XY would automatically treat non-wildcard patterns as surrounded by '*' (so they'd need to use 't*' and then 'a').


EDIT: And the problem with the current options is if you want the ability to match anywhere you typically lose the ability to immediately jump to files beginning with that letter.

In the previous example if the user wanted to use 'tar' to find 'altar.txt' they need match anywhere. But to jump to 't.txt' requires them to at least type two characters ('t.').

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 17:36
by admin
OK, I have understood it now. :om: In the next version try to tweak TAFMatchAnywhere=2 and see if this is what you meant.

My confusion came from this:
grindax wrote:Example use case:
I want to find movies starting with 'T' and I'm currently at the top of the List. So I hit 't' to scroll the List to that area.
Later I want to find a particular movie, so I type one word from the movie title to scroll the List to that file.
I understood these as connected: First you jump to the movies beginning with T, then from there you jump to a movie with "hot" in the name. This will not work since pressing "h" will move you up again. But when you meant these as two completely unrelated actions, then okay, it makes sense.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 18:17
by admin
A problem with TAFMatchAnywhere=2: If at least one file has the sequence "hot" at the beginning, then you will not be able to jump to or highlight any files with "hot" somewhere in the middle (because "match anywhere" is only triggered when there is NO match at the beginning).

Suggestion: trigger "match anywhere" if there is NO match at the beginning OR if the pattern is longer than 1 character.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 18:30
by TheQwerty
admin wrote:A problem with TAFMatchAnywhere=2: If at least one file has the sequence "hot" at the beginning, then you will not be able to jump to or highlight any files with "hot" somewhere in the middle (because "match anywhere" is only triggered when there is NO match at the beginning).

Suggestion: trigger "match anywhere" if there is NO match at the beginning OR if the pattern is longer than 1 character.
Hmm.. yes that does seem problematic. :?

Your suggestion seems reasonable to me, but would we run the risk of possibly beating XY by typing two characters before it had managed to focus the first-character's match?

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 18:53
by admin
No, XY cannot be beaten. :mrgreen:

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 19:00
by grindax
.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 19:05
by admin
That would kill TAFMatchAnywhere=2 for me. It's fine to have the option to jump to files by first letter, but it's more important for me to cycle all files with "snake" somewhere in the name when I type "snake", and not get stuck with that one file that happens to start with "snake".

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 19:11
by grindax
.

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 19:15
by admin
:) You are pushing your luck...

Re: Type Ahead Find: First match beginning, then match anywh

Posted: 25 Jul 2013 19:20
by avsfan
grindax wrote:
admin wrote:That would kill TAFMatchAnywhere=2 for me. It's fine to have the option to jump to files by first letter, but it's more important for me to cycle all files with "snake" somewhere in the name when I type "snake", and not get stuck with that one file that happens to start with "snake".
Is it possible perhaps to separate out the actions of focusing vs. highlighting and jumping to by keyboard shortcut? For example, focus/select by file beginning if possible, but highlight and jump between all matches anywhere.
Here's another possibility: If you prefix the find with the caret "^" then force the match at the beginning of the line (i.e. regexp syntax). Otherwise find anywhere.

So typing "^list" would only match files that started with "list" whereas typing just "list" would match all files containing "list" anywhere in the file name.

Since we already have the "*" as part of the TAF keys, I would think adding this as a prefix would be a natural fit. Since it uses regexp syntax, it's not likely to create much (if any) confusion, and makes a very powerful addition -- no tweaks needed. It just works! :)