Search in the C-] tag selection window

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Search in the C-] tag selection window

Woody Wu
Hi,

When I press C-] on a word, and if there word matches more than one
tags, then vim will prompt with a list, I then choice a entry number in
the list before it jumps to the desired destination.

But, in some caess, a word can much many many tags, like I usually met
in Linux kernel code, then it comes so hard to find out what entry is
that I actually want.  Here, I feel it's very good to let do some kind
of search, for example, using a same '/' key.

Is that possible? Or how do you guys do it?

BTW: I found, the ctags is not smart enough to recognize something like
'struct foo', vim will show you with all the tag named 'foo' other than
the exact struct 'struct foo'.


--
woody
I can't go back to yesterday - because I was a different person then.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Search in the C-] tag selection window

Tony Mechelynck
On 26/12/12 03:14, Woody Wu wrote:

> Hi,
>
> When I press C-] on a word, and if there word matches more than one
> tags, then vim will prompt with a list, I then choice a entry number in
> the list before it jumps to the desired destination.
>
> But, in some caess, a word can much many many tags, like I usually met
> in Linux kernel code, then it comes so hard to find out what entry is
> that I actually want.  Here, I feel it's very good to let do some kind
> of search, for example, using a same '/' key.
>
> Is that possible? Or how do you guys do it?
>
> BTW: I found, the ctags is not smart enough to recognize something like
> 'struct foo', vim will show you with all the tag named 'foo' other than
> the exact struct 'struct foo'.
>
>
If ctags isn't smart enough, try cscope, and don't forget to set the
'cscopequickfix' option (see ":help csqf" without the double quotes
shown here and also without the single quotes normally surrounding an
option name).

Best regards,
Tony.
--
BEDEVERE: Look!  It's the old man from scene 24 - what's he Doing here?
ARTHUR:   He is the keeper of the Bridge.  He asks each traveler five
           questions ...
GALAHAD:  Three questions.
                  "Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Search in the C-] tag selection window

Ümit Kablan
In reply to this post by Woody Wu
Hey,

26 Aralık 2012 Çarşamba tarihinde Woody Wu adlı kullanıcı şöyle yazdı:
Hi,

When I press C-] on a word, and if there word matches more than one
tags, then vim will prompt with a list, I then choice a entry number in
the list before it jumps to the desired destination.

But, in some caess, a word can much many many tags, like I usually met
in Linux kernel code, then it comes so hard to find out what entry is
that I actually want.  Here, I feel it's very good to let do some kind
of search, for example, using a same '/' key.

Is that possible? Or how do you guys do it?


I use tagselect plugin ( which loads the contents of what you struggle with into a buffer that's read only.
 
BTW: I found, the ctags is not smart enough to recognize something like
'struct foo', vim will show you with all the tag named 'foo' other than
the exact struct 'struct foo'.


--
woody
I can't go back to yesterday - because I was a different person then.

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


--
Ümit

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Search in the C-] tag selection window

Woody Wu
In reply to this post by Tony Mechelynck
On Wed, Dec 26, 2012 at 09:34:36AM +0100, Tony Mechelynck wrote:

> On 26/12/12 03:14, Woody Wu wrote:
> >Hi,
> >
> >When I press C-] on a word, and if there word matches more than one
> >tags, then vim will prompt with a list, I then choice a entry number in
> >the list before it jumps to the desired destination.
> >
> >But, in some caess, a word can much many many tags, like I usually met
> >in Linux kernel code, then it comes so hard to find out what entry is
> >that I actually want.  Here, I feel it's very good to let do some kind
> >of search, for example, using a same '/' key.
> >
> >Is that possible? Or how do you guys do it?
> >
> >BTW: I found, the ctags is not smart enough to recognize something like
> >'struct foo', vim will show you with all the tag named 'foo' other than
> >the exact struct 'struct foo'.
> >
> >
> If ctags isn't smart enough, try cscope, and don't forget to set the
> 'cscopequickfix' option (see ":help csqf" without the double quotes
> shown here and also without the single quotes normally surrounding
> an option name).
>

Thanks for telling me that.  But cscope even give me more unrelative
results than that of ctags. If you try to press C-] on the 'device' of
below statement in linux kernel source tree, you will know my pain:
    struct device dev;

> Best regards,
> Tony.
> --
> BEDEVERE: Look!  It's the old man from scene 24 - what's he Doing here?
> ARTHUR:   He is the keeper of the Bridge.  He asks each traveler five
>           questions ...
> GALAHAD:  Three questions.
>                  "Monty Python and the Holy Grail" PYTHON (MONTY)
> PICTURES LTD
>
> --
> 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

--
woody
I can't go back to yesterday - because I was a different person then.

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