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

Improve :o/:open path ordering #10766

Open
mway opened this issue May 15, 2024 · 0 comments
Open

Improve :o/:open path ordering #10766

mway opened this issue May 15, 2024 · 0 comments
Labels
C-enhancement Category: Improvements

Comments

@mway
Copy link

mway commented May 15, 2024

I searched for a bit but didn't see anything related, apologies if this is a dupe.

I noticed that when using :o to open files, tab completion does not prefer exact/closest match, which means more tabbing/typing is required than should be necessary. If I had to guess it's because file extension is not being treated differently from filename (or at least, as a match boundary).

For example, assume I have the following tree:

./
  foo.bar
  foo_baz.bat

If I :o foo (but do not hit enter), foo_baz.bat is the first item in the list, whereas I would expect foo.bar to be first as it is a closer match.

This is also the case outside of extensions, for example:

./
  foo/
    ...
  foo-bar/
    ...

If I :o foo again here, foo-bar will be first in the list. This case is worse IMO as we're preferring a non-exact match to an exact match.

Is there a setting I'm not seeing that controls this? If not, would it be possible to adjust sorting to prefer closer/exact matches?

@mway mway added the C-enhancement Category: Improvements label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

1 participant