I'm not really sure how to describe this behavior better than with the example I'm dealing with.
I'm trying to write a custom completion using fzf-vim ... and as I'm looking through the documentation, there is a section that describes how to do it briefly, but since I don't understand it fully, I wanted to play with the API.
So naturally I thought I'd be able to just do
:call fzf#vim#complete('cat /usr/share/dict/words')
instead of binding it to a binding and using that binding like they show with
inoremap <expr> <c-x><c-k> fzf#vim#complete('cat /usr/share/dict/words')
but the problem is, while the binding does pop up fzf, the :call fzf#vim#complete(...)
seems to do nothing.
I'm not sure what is causing this behavior, and if there is some other way I should be invoking the function? I don't mind reading stuff up in the documentation and learning about vimscript, but at this point I really don't know where to look anymore
As a side note, what I'm actually trying to do is create a fzf wrapper around :digraph
. I wasn't sure if this would be possible with just the output of :digraph
, so I found unicode.vim which even provides a function FindUnicodeBy which seems I should be able to just pass into the fzf#vim#complete
wrapper, but I can't even figure out how to test the completion function.
Any tips are very welcome, as well as references to stuff to read to be able to work better with vimscript!
:echo fzf#vim#complete('cat /usr/share/dict/words')
. See:help :map-expression
.