Reputation: 436
Is there a way of adding more information in my popup menu? For example:
What I would like is something like
< return type > < Function Prototype > <Function or Member indicator > < Filename >
This information can be provided by ctags. Currently I use vim without any plugins and the omnicompletion just does word completion using ctags without any information regarding its context
Upvotes: 1
Views: 736
Reputation: 172758
Behind omnicompletion (which you write you're using) is a custom completion function; to get more data displayed in the popup menu, that function would need to be extended. You can also write your own completion functions, but as the data processing has to be done in Vimscript, it might be slower than the built-in ones.
However, the built-in tags completion (which you hint at by mentioning ctags) :help i_CTRL-X-CTRL-]
has this feature:
The 'showfulltag' option can be used to add context from around the tag definition.
When completing a word in insert mode (see |ins-completion|) from the tags file, show both the tag name and a tidied-up form of the search pattern (if there is one) as possible matches. Thus, if you have matched a C function, you can see a template for what arguments are required (coding style permitting).
Upvotes: 2