> On 2011-09-10, Gavin wrote:
>> just as the title
>>
>> for example
>>
>> struct xxx
>> {
>> int a;
>> int b;
>> };
>>
>> int xxx;
>>
>> struct xxx n;
>>
>> only i need is struct xxx definition, how could do that ?
>
> As far as I know, Vim does not have an automatic way to do that, nor
> is there a plugin that does that. I think the best you can do is
> use ctags to generate the list of definitions, then use g] or g
> CTRL-] instead of CTRL-] to jump to the definition. Using g] will
> display a list of tags that match the word under the cursor and will
> show the "kind" of tag. In your example, typing g] over xxx would
> show this:
>
> # pri kind tag file
> 1 FSC s xxx foo.c
> struct xxx
> 2 F C v xxx foo.c
> int xxx;
> Type number and<Enter> (empty cancels):
>
> The 's' indicates that the tag is a struct definition and the 'v'
> indicates that the tag is a variable definition. See the ctags(1)
> man page for more about this.
>
> The g CTRL-] command is similar to the g] command but jumps
> immediately to the definition if there is only one. See
>
> :help :ts
> :help g]
> :help g_CTRL-]
>
> One other thing.
>
> You just asked this same question 8 hours previously. If you can
> see that your question made it to the list yet it has not received
> an answer, it means that no one knows the answer, no one has time at
> the moment to answer, or the question was worded so poorly that no
> one wants to take the time or effort to figure out what the poster
> meant. Asking the same question repeatedly does not endear one to
> the readers of this list. Be patient.
>
> Regards,
> Gary
>
...and if the question did _not_ make it to the list after 8 hours, it
could mean any of the following:
a) the moderators are all away or asleep at the same time.
b) it fell into a spam trap somewhere on the way (possibly including at
your own ISP, on the way to you after making it to the list)
c) you mistyped the To: address
In case (c), you should rather quickly get a bounce message telling you
that, let's say, vim-use@googlegroups.com (with a hyphen where an
underscore is needed) is an unknown address. Of the other two, I'd say
that (b) has a low but nonzero rate (statistically significant beyond
any reasonable margin of error), and that (a) has a high probability but
only if it's your first post to the list, or if the spam filters for the
list held the message for human inspection despite its author's being on
the whitelist.
Best regards,
Tony.
--
Did you ever see a "Hit any key to continue" message in a music piece?
--
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
No comments:
Post a Comment