0

Let's say I have a list of words in one file in my home directory (each word is in a separate line):

bar
barfoo
foo
foobar
...

How can I add this list of words to Vim deoplete auto-completion plugin? I've tried this solution without any results:

set dictionary=/path/to/wordsList.txt
call deoplete#custom#source('dictionary', 'min_pattern_length', 4)

Bonus Question: Can I configure deoplate to autocomplete words from all opened buffers (not the only one I'm currently editing)?

1 Answer 1

0

Caution: I don't use it and can't (most of my installations come without +python3 feature, and I sometimes I even have Python on the plateform). I'm writing based on the documentation.

First, according to :h deoplete-external-sources, you need to install (if it is not already the case) also deoplete-dictionary.

Second, you cannot get results for bar and foo with your setting which is filtering for words that are more than 3 characters only:

call deoplete#custom#source('dictionary', 'min_pattern_length', 4)

Regarding you bonus question, :h deoplete-source-buffer says that it's using also “the current tabpage windows buffers and the opened buffers which have same 'filetype'.” And you can make it collect keywords from buffers of any filetype by setting require_same_filetype to False. I'm afraid you can do no more than that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.