junegunn / fzf.vim

fzf :heart: vim
MIT License
9.59k stars 582 forks source link

Completion with Vimwiki omnicompletion function #1365

Open teranex opened 2 years ago

teranex commented 2 years ago

I'm trying to setup a shortcut to use Vimwiki's omnicompletion in combination with fzf, but I fail to see how to do this exactly.

In the issues I found #1221. This works with other completion methods such as file completion but with omni-completion it doesn't seem to work. When I type for example [[meetings<C-X><C-O> followed by <C-'> fzf simply inserts some text into the buffer:

[[meetings/1207:call <SNR>175_complete_trigger()

I also tried with the following in my vimrc:

inoremap <expr> <c-x><c-k> fzf#vim#complete('Complete_wikifiles')

But this has the exact same effect when typing [[meetings and pressing <C-X><C-K>.

Has anyone done something similar before?

The Vimwiki omnifunc can be found here: https://github.com/vimwiki/vimwiki/blob/dev/ftplugin/vimwiki.vim#L24

majjoha commented 2 years ago

I'd love to have something similar to this for Marksman. Did you figure out a solution, @teranex?

teranex commented 2 years ago

@majjoha no sorry, didn't look into it further