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
Don't sort if there is not filtering input #14
Comments
When there's no input, fruzzy native mod sorts the files by least levenshtein distance ascending. It also removes the current file from the list. This is done so that you can bounce between similar files (x.py/x_test.py or .h/.cpp) quickly. The python version does not do this since levenshtein libraries require a native mod and I don't want to complicate the installation.
That log is emitted once at initialization and is there to aid me in debugging when folks report issues :) |
I think the debug log should be option. |
More options => more complications. Also for something this trivial and echo'ed once per vim/nvim instance, I'm going to keep it the way it is. |
I don't like the option too. But I don't like the echo message. |
I think logger.debug() is better for it. |
logger.debug is useful during development - but that needs NVIM_PYTHON_LOG_LEVEL and NVIM_PYTHON_LOG_FILE to be set. Giving instructions to folks who're looking for support to setup logging and then grep through a huge log file vs "Hey - tell me what you see in |
Yes. But it is only used for debug. |
If it is error, it should be printed always. |
I don't think we're going to agree on this :). While I see your point, for me, user convenience trumps other aspects. However, I'll think about adding something like |
fruzzy#version() is better for me. |
Can I disable this behaviour while still use the native mod? Also I read your post but I'm not quite sure if there are, at a user level, noticeable differences between the python version and the native. In other words, if there aren't big differences and you prefer not to change this initial sorting setting then my question is: do I loose any feature of the matcher by using the python version instead of the native one? Once again thanks! |
I don't think the behavior is so useful... |
Not at the moment.
There are no differences other than this. Both have to pass the same tests. I'll probably add an option so that users can opt out if they want (till then you can switch to python version)
I actually sort of agree. When it works, it's really useful. When it doesn't, it leaves me head scratching. Till now I've found out that it doesn't work well with neomru (since that uses absolute paths). It seems to work well with file/file_rec though. Also, on windows, it seems to be more wonky due to path separator differences. |
pull from master now. Set |
@raghur thanks for the change. However I'm trying with
but entries are still sorted relative to the current file when using Edit: oh you already said that in your comment. So this is expected? (i.e it's a feature rather than a bug?) |
There was a bug that would have sorted entries even when sort on empty was set. I've now fixed Pls update and check. |
Thank you! |
Hi, if I use
let g:fruzzy#usenative = 0
withDenite file_mru
candidates are correctly ordered by the last recent one opened first:on the other hand if i use
let g:fruzzy#usenative = 1
then I get:So my question is: if fruzzy is a matching/filtering algorithm why is it also sorting candidates without any kind of filtering input? I expect it to honor the initial source sorting.
Another thing I've noticed is that when using the native version I get the following message before executing a denite source:
Can that message be suppressed? Thanks in advance
The text was updated successfully, but these errors were encountered: