Question

The problem about ctags and omnicppcomplete in vim. Omni does not show methods of class "string". (I had the same problem with STL library. I solved it by downloading STL and run ctags in this folder then set path the tags file.)
How to solve this problem, run ctags in /usr/include directory?

Was it helpful?

Solution

To get perfect C/C++/Objective-C code completion, i would recommend you to try Clang Complete.

But if you want to use omnicppcomplete, you need to generate tags for needed class, yes. If you need just "string" class, you can generate tags only for string.h, not for a whole /usr/include, to make it faster.

By the way, you might want to use plugin Indexer to get painless automatic tags generation for a whole project(s).

OTHER TIPS

I use tags for STD C++ that hosted in vim.org, it uses modified libstdc++ headers for use with ctags. And omni works well with it.

This is a slightly modified version of the libstdc++ headers which can be used with ctags. STL, streams and other standard cpp stuff can now be completed with omnicpp complete.

You can download it at HERE.

Note: The update time(2008-08-26) is so....however, the basic needs are okay. :p

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top