Search code examples
vimautocompleteneocomplete

Why we need autocomplete plugin for Vim since we have omni completion?


I am playing with vim currently and trying to configure it for a good editor for Java. When I configure the auto-completion feature for java, I was recommended to install plugins such as neocomplete or delplete. But the default auto-completion like omni works just fine if you find the right source for omni-completion plugin such as vim-javacomplete2.

So why do we need such plugin like neocomplete?


Solution

  • The most probable reason you were recommended to use the delplete plugin is that it performs its autocompletion actions asynchronously. This can be a great benefit over native Vim autocompletion, which I believe still performs those actions synchronously.

    The benefit lies in the case where the action to complete is long & slow: an asynchronous task will allow for other tasks to run alongside it while it works, while a synchronous task will block other tasks and make them wait for it to finish. Having "asynchronicity" will provide a smoother experience and shorter overall wait times.

    Autocompletion tasks definitely have the capacity to be slower, but if you don't notice any slowdowns there's no pressing reason to switch to delplete if you don't want to.