Thread: RE: [Ctags] help
Brought to you by:
dhiebert
From: Coen E. <Coe...@cm...> - 2001-07-16 15:40:35
|
I am not completely sure about this, but try the following: - it seems to me that you are using C++ (or strange C anyway ;-) ), so the "--langmap=c:.c.ec" might be the problem. You expect tags for C++ classes, but ctags is looking for C definitions. I'm not sure about the c++ equivalent of your langmap command. Try "--langmap=c++:.c.ec" or "--langmap=cpp:.c.ec" AFAIK ctags sees .c--files as C++ sources by default (but not the .ec-files). - If you have multiple definitions in several files, all with the same definition/tag name, then ctags will just create multiple tags for them. it is up to your editor to select between the tags. In the Vim editor, for instance, in stead of <CTRL-T> or :tag <tagname> use: :ts <tagname> This will allow you to select a specific tag from multiple definitions. - does your tags file contain all the tags that you expect? Just open the tags file with your text editor and search for them. If they are all there, then your question is probably not ctags-related, but editor related. Hope this helps, Coen > I have one question regarding cross ref files. > I have 5 files in Same directory. > > 1. test.C ( test::setname() {rest.gettext(); > getname()} ) > > 2. test.ec (or test.pc proc file)( test::getname() > ) > 3. rest.ec ( rest::gettext() ) > 4.test.h( {class test{ getname();setname();}; ) > 5.rest.h ( class rest{ gettext(); } ) > > So in my dir, I run the command > "ctags "--langmap=c:.c.ec" -R > When I open the test.C file, cursor is positioned at > gettext(), it is saying that no tag is found error > coming. > If I put cursor at getname in test.C file, it is > working fine.But getname is in test.ec file. > > What may be the problem with gettext ( no tag). > > Is there any solution to access cross ref files. |
From: Coen E. <Coe...@cm...> - 2001-07-17 09:10:26
|
I thought that --langmap=c:.c.ec tells vim to treat (only) files with extensions *.c and *.ec as C-sources, and that you should use: --langmap=c:+.ec If your *.c files contain C++ class definitions, ctags will not read them because it is not a valid C-definition (classes only exist in C++, not in C). Therefor, ctags does not create tags for the class definition. Now I'm not sure. It's possible that ctags really is reading all your files as C++ sources, but something else goes wrong because declarations and definitaions are in different files (or something like that). In that case: Sorry, I don't know C++ or C++ tags, I can't help you. The ctags manual at http://ctags.sourceforge.net/ctags.html may help. HTH Coen > -----Original Message----- > From: chalapathi rao borra [mailto:ch...@ya...] > Sent: 16 July 2001 20:41 > To: Coen Engelbarts > Subject: RE: [Ctags] help > > > Hi, > Thanks for reply. I am using C++ and ESQL/C. > I find only some tags and some not find in the tags > file. Please see the question once again. Actually > some functions of class is defined in *.C file and > some in .ec file. If I go to the C file, then I am > able get all functions in any file. But if it is some > func in another class, and it is defined in .ec file > then it is saying that tag is not found. Since tag is > not generated. If U have any quieries, please let me > know. > > Thanks again. > > Cheluus > > > --- Coen Engelbarts <Coe...@cm...> wrote: > > I am not completely sure about this, but try the > > following: > > > > - it seems to me that you are using C++ (or strange > > C anyway ;-) ), > > so the "--langmap=c:.c.ec" might be the problem. You > > expect tags for C++ > > classes, but ctags is looking for C definitions. I'm > > not sure about the c++ > > equivalent of your langmap command. > > Try "--langmap=c++:.c.ec" > > or "--langmap=cpp:.c.ec" > > AFAIK ctags sees .c--files as C++ sources by default > > (but not the > > .ec-files). > > > > - If you have multiple definitions in several files, > > all with the same > > definition/tag name, then ctags will just create > > multiple tags for them. it > > is up to your editor to select between the tags. > > In the Vim editor, for instance, in stead of > > <CTRL-T> or > > :tag <tagname> > > use: > > :ts <tagname> > > This will allow you to select a specific tag from > > multiple definitions. > > > > - does your tags file contain all the tags that you > > expect? Just open the > > tags file with your text editor and search for them. > > If they are all there, > > then your question is probably not ctags-related, > > but editor related. > > > > Hope this helps, > > > > Coen > > > > > > > I have one question regarding cross ref > > files. > > > I have 5 files in Same directory. > > > > > > 1. test.C ( test::setname() {rest.gettext(); > > > getname()} ) > > > > > > 2. test.ec (or test.pc proc file)( > > test::getname() > > > ) > > > 3. rest.ec ( rest::gettext() ) > > > 4.test.h( {class test{ getname();setname();}; ) > > > 5.rest.h ( class rest{ gettext(); } ) > > > > > > So in my dir, I run the command > > > "ctags "--langmap=c:.c.ec" -R > > > When I open the test.C file, cursor is positioned > > at > > > gettext(), it is saying that no tag is found error > > > coming. > > > If I put cursor at getname in test.C file, it > > is > > > working fine.But getname is in test.ec file. > > > > > > What may be the problem with gettext ( no > > tag). > > > > > > Is there any solution to access cross ref files. > > > > _______________________________________________ > > Ctags-users mailing list > > Cta...@li... > > > http://lists.sourceforge.net/lists/listinfo/ctags-users > > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > |
From: Coen E. <Coe...@cm...> - 2001-07-17 09:14:11
|
> Now I'm not sure. It's possible that ctags really is reading > all your files as C++ sources, but something else goes wrong > because declarations and definitaions are in different files > (or something like that). > In that case: Sorry, I don't know C++ or C++ tags, I can't help you. You can check this by running ctags with the --verbose option. Then for each source file, ctags will tell you what language it thinks is in the file. HTH Coen |