-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More robust fuzzy finding #2290
Comments
Currently the ordering of the tokens matters for the fuzzy find. A way around this with the current matching behavior is to use CtrlSpace which filters the current selection. So you retain your current set of matches and the filter resets: anything you type after CtrlSpace applies to that filtered subset. But a more flexible fuzzy matching could be nice if it's still efficient to compute. |
OK, |
I personally love fuzzy matching, but am not a fan of some of the subtleties. Currently, I am working on a branch where IE:
My hope is this syntax not only helps deal with files, but also doubles as a more effective symbol picker and grep! Anyway, that is my sales pitch. Thank you for attending my TED talk. Looking forward to some feedback 😄 |
Just speaking generally, I think VSCode Let's say I am assigned a ticket for a part of the codebase I've never touched before. I know the feature has to do with the event service dependencies I think there's benefit to have this Just Work™ in helix |
@lukepighetti Precisely, this happens to be exactly how VSCode fuzzy search works. |
fzy's matching and scoring algorithm is excellent. Looks like someone already did RIIR :) (crates) |
Interestingly enough, trim.mov |
If I can be totally honest with you all, I have always had terrible luck with fuzzy finders when it comes to usability in frontend search-as-you-type experiences. From a product sense, in most front-end applications, fuzzy finding always seems to lose out to an algorithm along the lines of:
And you can adjust that score on relevance criteria like |
@lukepighetti hm actually - why are you typing spaces? I think something like "evservpubspec" might work better with most matchers? |
That's not intuitive to me. |
Oh whoops I misread the initial issue - I thought it was about the ordering of the tokens rather than whitespace. Whitespace is currently considered to be part of the match, so if you have a file name with spaces in it the whitespace will match towards those. Depending on the type of project you're working on, whitespace may be very uncommon. Maybe it would make sense to strip the whitespace before fuzzy matching? On the other hand, it's pretty straightforward to just not type the whitepace. |
I think there are two ways of looking at this.
The reason I'm here personally is because helix has been the easiest CLI editor for me to onboard to from VSCode with all the fantastic built in tooling. My personal desire is to see it work in a way that is intuitive to all, not just intuitive to CLI folks. But that's just my personal context. As a side note, never once have I seen whitespace match in a search-as-you-type feature in a mobile or web app. It's usually used to split tokens. |
The fuzzy-finding matcher is not token based so a character to split tokens is unnecessary. To fix this case we'd have to discard the whitespace which would reduce functionality: you could no longer use whitespace to match whitespace. |
Using a space to find a file will likely occur a great deal less often than users will confused by the current behavior of Using |
Given a piece of text
You cannot match it with the query
event service pubspec
It would be nice if fuzzy finding was robust enough to handle this type of use case
The text was updated successfully, but these errors were encountered: