vim/ctags/c++ does not work as expected - Unix

This is a discussion on vim/ctags/c++ does not work as expected - Unix ; Hi, I am using vim 7.0 and Exuberant Ctags 5.4 on RedHat Linux. I go to the root of my source tree and run this command, ctags -R -V -x src_root > log I check out log and I see ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: vim/ctags/c++ does not work as expected

  1. vim/ctags/c++ does not work as expected

    Hi,
    I am using vim 7.0 and Exuberant Ctags 5.4 on RedHat Linux. I go to
    the root of my source tree and run this command,

    ctags -R -V -x src_root > log

    I check out log and I see all my c++ code are visited, but they are
    identified differently, for example,

    OPENING src_root/engine.c as C language file
    OPENING src_root/engine.hc as C++ language include file

    I wonder if this causes the problem I see, when I open one C++
    source file, go to a function and press, "CTRL+]", it does not go to
    the calling of the function in another C file.

    I then open the tags file generated by ctags, I can only see that
    function associated with one file, not both.

    Could you point me what is wrong?

    Thanks.


  2. Re: vim/ctags/c++ does not work as expected

    On Apr 4, 4:06 am, linq...@hotmail.com wrote:
    > Hi,
    > I am using vim 7.0 and Exuberant Ctags 5.4 on RedHat Linux. I go to
    > the root of my source tree and run this command,
    >
    > ctags -R -V -x src_root > log
    >
    > I check out log and I see all my c++ code are visited, but they are
    > identified differently, for example,
    >
    > OPENING src_root/engine.c as C language file
    > OPENING src_root/engine.hc as C++ language include file

    Are you having mixed code C/C++ or only C code or only C++ code ?
    you can use language map option of ctags, to override default option
    of ctags, if you doubt it is not correctly navigating the code.
    >
    > I wonder if this causes the problem I see, when I open one C++
    > source file, go to a function and press, "CTRL+]", it does not go to
    > the calling of the function in another C file.
    >
    > I then open the tags file generated by ctags, I can only see that
    > function associated with one file, not both.
    >
    > Could you point me what is wrong?
    >
    > Thanks.


    -raxit


  3. Re: vim/ctags/c++ does not work as expected

    linq936@hotmail.com wrote:

    > OPENING src_root/engine.c as C language file
    > OPENING src_root/engine.hc as C++ language include file


    Use "ctags --help" to see what file suffixes are associated with what
    languages (and remember that Unix file names are case-sensitive).

    --
    mail1dotstofanetdotdk

  4. Re: vim/ctags/c++ does not work as expected

    On Apr 4, 4:06 am, linq...@hotmail.com wrote:
    > Hi,
    > I am using vim 7.0 and Exuberant Ctags 5.4 on RedHat Linux. I go to
    > the root of my source tree and run this command,
    >
    > ctags -R -V -x src_root > log
    >
    > I check out log and I see all my c++ code are visited, but they are
    > identified differently, for example,
    >
    > OPENING src_root/engine.c as C language file
    > OPENING src_root/engine.hc as C++ language include file
    >
    > I wonder if this causes the problem I see, when I open one C++
    > source file, go to a function and press, "CTRL+]", it does not go to
    > the calling of the function in another C file.


    It's not supposed to go to calling of function. It will lead you to
    defination of function.
    You might want to try cscope.

    > I then open the tags file generated by ctags, I can only see that
    > function associated with one file, not both.


    Thats correct there is always a single entry for a function in tags
    file point to its defination

    > Could you point me what is wrong?
    >
    > Thanks.


    -Cheers,
    Gunvant
    ~~~~~~~~
    No trees were killed in the sending of this message. However a large
    number of electrons were terribly inconvenienced.


+ Reply to Thread