简体   繁体   中英

c++, omnicppcomplete doesn't show methods for string

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?

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).

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM