Closed ChrisAmelia closed 5 years ago
First of all, vim-clap is not essentially a fuzzy finder, but a more generic filter and dispatcher that works only in vim or neovim. Currently only the substring fuzzy filter is available for sync providers, see README, thus loin
won't find what you want, try lo in
for now. More fuzzy filter mode will be added, and PR is welcome.
What's more, although one of vim-clap's features is in pure vimscript, I'm not against supporting more fuzzy filter using python or other tools. Anyone interested in adding new fuzzy filters could take a look at https://github.com/liuchengxu/vim-clap/blob/master/autoload/clap/filter.vim.
@L-Vim If using macOS or Linux, you can try https://github.com/liuchengxu/vim-clap/pull/18 for new fuzzy finders support: fzy and fzf. But you have to run the sync provider using source_async
, e.g., :Clap files ++externalfilter=fzy +async
or :Clap files +async
. But it also has some drawbacks, see #17. Any feedback is appreciated.
Here is how I tested it.
vim-clap version: bf8effb7c759797e345f57261192cae940110e28 of branch validator-registration-info
.
Testing with :Clap files ++externalfilter=fzf +async
or :Clap files +async
and previous minimal vimrc.
LocalInterface
, no files are displayed:When typing the first letter of LocalInterface
, message NO MATCHES FOUND
immediately appears.
plugins_settings.vim
with input insvim
:Now testing with :Clap gfiles ++externalfilter=fzf +async
or :Clap gfiles +async
, previous minimal vimrc and my dotfiles repo (https://github.com/L-Vim/dotfiles):
:Clap gfiles +async
(or :Clap gfiles ++externalfilter=fzf +async
), no files are displayed at first, but after having typed a letter and deleting it, every file is displayed as expected:plugins_settings.vim
with input insvim
:For https://github.com/liuchengxu/vim-clap/pull/18/commits/bf8effb7c759797e345f57261192cae940110e28 only Clap files +async
and Clap blines +async
works, otherwise +async
will be ignored. The other providers have not been checked. Furthermore, not all sync providers support async
feature, like Clap buffers
, it's unworthy.
When you run Clap files +async
at the first, the display window is empty, that is expected. But now I think it could be improved via fetch all the items without any filtering.
This is the result of searching for file plugins_settings.vim with input insvim:
I believe that how fzf works, you can try other fuzzy filters if you are unsatisfied with filtered result. What vim-clap did is merely to feed the whole output of source
and the input to the filter(only fzy, fzf for now) and then display the filtered result.
@L-Vim Please try https://github.com/liuchengxu/vim-clap/pull/18/commits/d88b7014ee50f77071a88714aef284f29d27aa06 . I have improved a lot, now basically everything could be async! Now you could use Clap!
to tell vim-clap to try running async, e.g, :Clap! blines
. Of source, +async
also works, it's equal to :Clap!
.
Environment:
Describe the bug
When looking for a file
LocalInterface
with partial characters contained in that name, matches are no found.To Reproduce
min.vim
:LocalInterface
:Start neovim with command:
nvim -u min.vim
Type
:Clap files
In Clap prompt window, type
loin
.File
LocalInterface
doesn't appear, instead no matches are found.Expected behavior
File is found when searching with partial characters; as in FZF.