What is the difference between the ‘omnifunc’ and ‘completefunc’ autocomplete in Vim, except for the invocation key mapping?

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 special
semantics 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.vim files, where ‹ft› stands for a
particular filetype. See those Omni completion files for C or Python
filetypes as a reference.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)