Closed dlee closed 10 years ago
You must use sorter_rank
.
My .vimrc has these lines:
Where is sorter_rank
?
I tend to type in file names for searching, but unite.vim prioritizes matches where the directories match the names instead of the files.
Plese show me the minimal .vimrc and the reproduceable ways from Vim starting. I cannot reproduce it.
Oops, I have this line as well:
call unite#custom#source('buffer,file,file_mru,file_rec,file_rec/async', 'sorters', 'sorter_rank')
A common use case is when I have the following files among hundreds:
hello_there/hi.vim
hello_there.js
hello_there.vim
Typing he
reduces the file list to the above three, but in this order:
hello_there.js
hello_there.vim
hello_there/hi.vim
My goal is to get to hello_there.vim
, so I continue the matching by typing v
to differentiate between hello_there.js
and hello_there.vim
.
However, now the list has changed so that the he
portion matches the directory name with higher priority:
hello_there/hi.vim
hello_there.vim
The only way I can get hello_there.vim
to come on top is by typing out the whole name. Instead, I would like hev
to prioritize hello_there.vim
over hello_there/hi.vim
.
OK. But I don't want to change it. Pull request is well come.
You can change sorter_rank code. I have not much time.
https://github.com/Shougo/unite.vim/blob/master/autoload/unite/filters/sorter_rank.vim
When using
matcher_fuzzy
andsorter_rank
, I think all the most relevant results end up at the bottom of the list.I tend to type in file names for searching, but unite.vim prioritizes matches where the directories match the names instead of the files.
Is there a way to reverse this?
My
.vimrc
has these lines: