Reputation: 783
I'm wondering if it's possible or not to auto complete function arguments from tags generated by exuberant ctags? I noticed that when I generate a tag, I see the function argument WITH the function, so it would be logical to assume that it's possible to complete the arguments.
I'm familiar that there are alternatives such as clang_complete and youcompleteme, which uses the clang compiler, but that's an added dependency. I'm already using Tagbar + EasyTags, etc, so why not just use tags if it's already there, than to bloat up vim.
Upvotes: 4
Views: 5303
Reputation: 8905
It's not really "completion" of the function arguments, but from the comments on your question you said you want a guide to what arguments a function takes after doing tag completion.
If your completion method supports it, you can see such a guide with :set completeopt+=preview
.
The C filetype plugin distributed with Vim sets the 'omnifunc'
option to ccomplete#Complete
which supports this option, using the tag signature. I believe it also works for C++. You may need a similar completion function for other languages.
To use it, do "omni" type completion after setting the option, with <C-X><C-O>
in insert mode.
Upvotes: 2