Sunday, May 9, 2010

Re: CTRL-] jumping for local variable

On 9 May 2010 12:27, Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
> On 09/05/10 05:57, Steven Woody wrote:
>>
>> Hi,
>>
>> When using ctags,  CTRL-] does not work for local declared variables,
>> in the case, I have to use gD to do the jumping.  Does this behavior
>> changeable? I hope I can always use CTRL-] and CTRL-T.
>>
>> Thanks.
>>
>
> I think it's intentional. Let's say you have a lot of functions all over
> your code with in each of them a local loop counter named i -- if ctags were
> to tag them, Vim could never know which one you mean when hitting Ctrl-] on
> one of them: Vim tags are global; and BTW, gD is also supposed to be global.
>

It sounds reasonable. But, how about when a user type CTRL-] and not
tag found for it, then vim automatically use gD to do the jumping?
And, in this case, CTRL-T also bring the user back. If so, the local
variables don't need to be in the tags database. Can vim do it?
Thanks.

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 (narkewoody@gmail.com)

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