Skip to content
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

Improvement to search ordering for :open #11618

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TiredTumblrina
Copy link
Contributor

Adds input prefix match-based ordering to the :open command, as suggested by #10766. The best_match function is written in a very rough, non-idiomatic way at the moment, it's subject to change so feel free to send suggestions and optimizations my way.

The example with ".conf" as input is fixed by this patch:
open_ordering

@pascalkuthe
Copy link
Member

We will not add this kind of custon algorithm. The fuzzy matching socring is very sophisticated and usually does a really good job. The case jn that issue just happens to have cases that score the exact same. We should be using length as a tie breaker in those cases (in which case .config would be first) nucleo also has the option to penalize nkn-prefix matches slightly. Both of those would be the right way to address that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants