How to automatically open a window when using tags?

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

How to automatically open a window when using tags?

Peng Yu
I use ctrl+] to trace the tags. But it uses the same window. I want
show both the original window and the new window. Could you let me
know what command to use to preserve the old window?

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

To unsubscribe, reply using "remove me" as the subject.
Reply | Threaded
Open this post in threaded view
|

Re: How to automatically open a window when using tags?

Tony Mechelynck
On 04/04/10 23:29, Peng Yu wrote:
> I use ctrl+] to trace the tags. But it uses the same window. I want
> show both the original window and the new window. Could you let me
> know what command to use to preserve the old window?
>

Help windows all reuse the same window by design; but I suppose you
could do something like

        :noremap <C-]> <C-W>s<C-]>

to split the window immediately before jumping to the tag. See :help
:split (and see which Normal-mode commands have the same effect). Beware
that this will also multiply your help windows, since program tags and
help tags use essentially the same mechanism internally.


Best regards,
Tony.
--
Talking much about oneself can also be a means to conceal oneself.
                -- Friedrich Nietzsche

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

To unsubscribe, reply using "remove me" as the subject.
Reply | Threaded
Open this post in threaded view
|

Re: How to automatically open a window when using tags?

Nazri Ramliy
On Mon, Apr 5, 2010 at 5:50 AM, Tony Mechelynck
<[hidden email]> wrote:
> Help windows all reuse the same window by design; but I suppose you could do
> something like
>
>        :noremap        <C-]>   <C-W>s<C-]>

That's a lot more keys than you'd actually need:

        <C-W>]

Would achieve the same result.


nazri.

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

To unsubscribe, reply using "remove me" as the subject.