05 Aug, 2009, JohnnyStarr wrote in the 1st comment:
Votes: 0
I've been able to use ctags for my project in VIM, its great with OmnicppComplete.
Is there a place you can download all the tags for C++ libraries?
05 Aug, 2009, Runter wrote in the 2nd comment:
Votes: 0
staryavsky said:
I've been able to use ctags for my project in VIM, its great with OmnicppComplete.
Is there a place you can download all the tags for C++ libraries?


You mean for standard libraries, correct?
05 Aug, 2009, JohnnyStarr wrote in the 3rd comment:
Votes: 0
yes, that's what I meant.
i was under the impression that the ctags app came with a database of all the standard library tags.
i've been trying to figure out if i need to download it separately. i am using Cygwin, but i didn't see any
way to to do this in the setup.
05 Aug, 2009, Davion wrote in the 4th comment:
Votes: 0
Not actually sure where to find them, but out of curiosity, specifically, why do you want them?
05 Aug, 2009, JohnnyStarr wrote in the 5th comment:
Votes: 0
I would like it because I dont know what all options there are for C++. When it comes to string class
for example, I would like to be able to do this:
string my_string;

my_string. <- this would list all the string class members that are available.


hopefully my point came across despite the poor example.

More or less i dont want to have to have a book handy just to be able to know what class methods i have
to my disposal.
05 Aug, 2009, Runter wrote in the 6th comment:
Votes: 0
My suggestion would be getting a good STL reference or finding one online.
05 Aug, 2009, JohnnyStarr wrote in the 7th comment:
Votes: 0
This is exactly what I want. I do have Omni, but it requires you provide the ctags DB. (sigh) :wink:
05 Aug, 2009, Davion wrote in the 8th comment:
Votes: 0
Well, I installed exuberant-ctags and did a little test… seemed to show C++ members fine.
skelly:~/test$ more test.cpp
#include <iostream>
#include <list>
#include <vector>
#include <map>

class some_class
{ public:
std::string some_string;
std::list<some_class> some_list;
std::vector<some_class> some_vector;
std::map<int, some_class> some_map;
};


int main( void )
{ some_class c;

c.some_string = "Something";

return -1;
}

skelly:~/test$ ctags -x ./test.cpp
main function 15 ./test.cpp int main( void )
some_class class 6 ./test.cpp class some_class
some_list member 9 ./test.cpp std::list<some_class> some_list;
some_map member 11 ./test.cpp std::map<int, some_class> some_map;
some_string member 8 ./test.cpp std::string some_string;
some_vector member 10 ./test.cpp std::vector<some_class> some_vector;
05 Aug, 2009, Kline wrote in the 9th comment:
Votes: 0
Tags or not, best online reference I've found (and routinely use) for C++ STL stuff, it even has C lib stuff: http://www.cplusplus.com/reference/
05 Aug, 2009, Erok wrote in the 10th comment:
Votes: 0
Kline said:
Tags or not, best online reference I've found (and routinely use) for C++ STL stuff, it even has C lib stuff: http://www.cplusplus.com/reference/

Second.
05 Aug, 2009, David Haley wrote in the 11th comment:
Votes: 0
Take a look at this vim download, it seems to have what you need and tells you how to set up vim to look at the tags file. Disclaimer: I haven't used this particular script, but I have generated the STL tags database myself (using ctags) and used it with OmniCppComplete.
05 Aug, 2009, JohnnyStarr wrote in the 12th comment:
Votes: 0
Thanks allot guys. :biggrin:
05 Aug, 2009, David Haley wrote in the 13th comment:
Votes: 0
I hope that you successfully allot the knowledge learned here to a lot of problem areas. :devil:
05 Aug, 2009, JohnnyStarr wrote in the 14th comment:
Votes: 0
burn…
06 Aug, 2009, JohnnyStarr wrote in the 15th comment:
Votes: 0
Ok,

So I used the link David provided, and it works great for cpp files as far as the STL omni complete and all.
Now I am wanting to be able to have my 'tags' file not only have the standard cpp libraries, but also my src files
for my project. Before I would do a simple ctags command like:

ctags -R –c++-kinds=+p –fields=+iaS –extra=+q

in the source folder that my project was in and it would work fine.

The cpp_src folder within the vim script at the link generates a tag database from all the containing files.

I wrote a csh script that does the following:

#!/bin/csh

ctags -R –c++-kinds=+p –fields=+iaS –extra=+q
echo ctags created for mud src files

mv tags mudtags
echo changed name of tags to mudtags

cp ~/utility/c_tags/tags ~/mud/src
echo copied c / c++ taglist to src file

mv tags cpptags
echo changed name of c / c++ tags file to cpptags

cat mudtags cpptags > tags
echo concantinated mudtags and cpptags into standard tags file for omni

rm mudtags
rm cpptags
echo removed mudtags and cpptags

echo -Tag Migration Complete!


Unfortunately this does not work for the /src files of my project, it does however use the cpp portion of the tags db.

Anything I'm missing?
06 Aug, 2009, David Haley wrote in the 16th comment:
Votes: 0
You don't need to put everything into one tag file. vim will always read the 'tags' file in the current directory, so just use that for your source files. Then, create the STL tags file separately, and put it somewhere easy to find like ~/.stl.tags. Then, edit your .vimrc to load up that tag file as well (the link explains how to do that).

That way, it will load up your normal tags file, plus the ~/.stl.tags file.
06 Aug, 2009, JohnnyStarr wrote in the 17th comment:
Votes: 0
Sweet!

Thanks a (space) lot. :wink:
0.0/17