Tuesday, April 23, 2013

vim + ctags for C++ problem

Hi,

This is my first post on this wonderful group so : Hi everybody:)

I'm using Vim for some time as my C++ editor. And I have a problem using c++ tags with following case:

my program( generated tags attached, I hope it is allowed for this group:) ):

class alpha
{
    int b;
    public:
    int d;
};

class beta
{
    public:
    int b;
    public:
} ;



int main()
{


    return 0;
}

I generate c++ tags for it with:

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

And now my cursor is somewhere in main function and I want to jump to beta::b definition so I do:

:ta beta::b

and vim jumps to alpha::b ???

When I print possibilities:

:ts

it is something like:
beta::b
class:beta access:public
int b;

So :ts properly is showing the jump location but for some reason calling it via:

:ta beta::b

gives me wrong result.

All this problem happns only if I have two or more classes definition in the same file. If they are spread around diffrent files then it is all fine.

vim version: 7.3 Included patches 1-854
ctags --version :  Exuberant Ctags 5-9-svn20110310
OS: Ubuntu 12.04, Fedora 14

SO Do I miss something or it is a bug?

Kindest Regards,
Jacek

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
 
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: