Is there any difference in functionality between these two types of complete-functions in Vimscript?
Is there any difference in functionality between these two types of complete-functions in Vimscript?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Technically, there is no difference in implementation of both
User-defined completion (see
:help compl-function,:help 'completefunc') and Omni completion (see:help compl-omni,:help 'omnifunc'). Both of them work by calling a function of specialsemantics that locates the start of the expression to be completed at
the current position, and provides appropriate completion suggestions
(see
:help complete-functions).Where the difference between these two types of completion manifests
itself, is the purpose of completion. User-defined completion should
be customized by the user themselves according to conditions specific
to a particular completion idea. Omni completion is supposed to be
filetype-specific. Hence, separate Omni completion functions for
different filetypes are loaded automatically by Vim from
autoload/‹ft›complete.vimfiles, where‹ft›stands for aparticular filetype. See those Omni completion files for C or Python
filetypes as a reference.