I have just discovered the taglist plugin for vim, and read about how to use it with ctags.
However, disappointingly ctags is a very simple parser.
Is there an alternative that is more complete?
Specifically I’m looking for something that:
-
expands
#define(x, y) x ## ystyle macros for function declarations -
processes
#includestatements -
allows include paths to be specified for dependencies
I see that clang provides a programatic api for accessing the c AST, so surely this isn’t terribly hard to do?
Has someone already done it?
—
Edit:
These ones don’t cut it:
-
clang_indexer – Doesn’t compile; when it does (after hacking), doesn’t work (endless errors).
-
clang_complete – Doesn’t seem any better than ctags. No context specific recommendations, no struct completion, no function arguments, no macro expansion; just a list of symbols and the file they came from.
I’ve spent quite some time struggling with this myself.
The closest I ever got was something called gccsense. Unfortunately, the project seems abandoned and moreover it was difficult setting it up because English was not the author’s first language.
I ended up approaching the problem from another angle. I made the decision that intellisense/autocomplete was more important to my coding than having all the available features of vim, so I chose an IDE like Eclipse, and then found a plugin for Eclipse that emulates Vim. So far the best kind of plugin like that that I found was Viable.
Here is the full list of options that I have tried and found unsatisfactory:
If you do find a solution you are happy with please share it in a comment, because I would be interested in it.