Reputation:
I use tag files for code completion and for a quick, inline view of parameters, overloads, files (where declared), etc. Where can I find freely available tags for the C99, C++03, and C++0x standard libraries? (C89 would be better than nothing, but I'd rather have C99.)
I prefer tags without cruft; e.g. implementations use reserved names for parameters, so instead of "std::min(_M_a, _M_b)", I'd rather see "std::min(a, b)". This and other issues rule out generating from actual implementations. Though I suppose some postprocessing might clean those up (especially the identifier issue), it almost seems like it would be easier to write from scratch.
Upvotes: 18
Views: 2672
Reputation: 49029
If getting completion for standard libraries is the main issue, the clang vim plugin does this quite well without using tags at all. There is however, still some parameter "cruft" in the completions, as it uses the symbols used by the header.
You mainly just drop one file in ~/.vim/plugin, install clang, and it works. Much simpler than the omnicomplete route. The only issue I've had so far in my limited use of it is that it is sometimes slow coming up with the completions.
Upvotes: 0
Reputation: 1675
For those exact requirements you will probably have to create those yourself :(
Upvotes: 2
Reputation: 5540
Generally it is difficult to extract tags from libc
because function declarations are likely to be implemented in the headers as complex macros. One can use nm
to find a list of symbols exported by the a library, but that doesn't address the parameter list.
I think the best solution here is to parse the documentation:
Here is a list of all functions and macros exported by libc
in an easily parsed format:
http://www.gnu.org/s/libc/manual/html_node/Function-Index.html#Function-Index
Each function links to a page that lists the parameters for that function, also in a predictable format:
http://www.gnu.org/s/libc/manual/html_node/Block-Input_002fOutput.html#index-fread-1010
Parsing the pages are pretty easy using BeautifulSoup
Python module.
Upvotes: 5
Reputation: 6788
This is not a complete answer. Someone published a perl script to extract tags from SGI's STL documentation. It does not include function parameter names. Since it works on the documentation there is no cruft. Hope this helps a bit.
Upvotes: 0
Reputation: 305
generate yourself a tag library using ctags on headers dir, like written in the post blog you link in your question
Upvotes: 2