Hello!

I like experimenting with vim’s features and one of those is omni completion. This type of completion can be fed by plugins but vim also comes shipped with some included omni completion functions. Those are documented in compl-omni-filetypes, the according scripts are found in $VIMRUNTIME/autoload/.

One of the included scripts is for C which I tried the most. But I was never really satisfied with it. It requires the usage of ctags which is fine as I also need this for using tags to navigate.

But the completion of the fields in structs which would be its most handy feature in C just never seems to work in a satisfying way. Sometimes it just fails entirely and when it does not, it always adds a . after the completed fields even though the completed field is not even a structure. Same applies for [ characters that are completed at times that I do not want them.

Also, the popup that should show some information about the completed object is not really helpful but rather confusing. It shows what kind of object this is, but only with one letter, so you have to guess what that letter means. It always show if it is static using 1 and 0 which I do not find an elegant solution then it prints something like

struct    __anon0d38083b0108

which comes directly from the tags file and contains no information at all that I find useful.

There are also other omni completion functions which I briefly had contact with. It seems like the HTML completion is for HTML 4, which is out of use for more than 10 years now…

The documentation of the JavaScript completion (ft-javascript-omni) states the following:

At the moment (beginning of 2006) there are two main browsers - MS Internet Explorer and Mozilla Firefox. These two applications are covering over 90% of market.

I will let that one speak for itself.

So to sum up I do not find this feature of vim particularly helpful. Especially when we look to the language server based completion options that other editors have built in, but can also be brought to vim with some tinkering.

Do you have a similar or different experience with omni completion?