Re: split vertically at a tag

2006-10-18 Thread Charles E Campbell Jr

Kamaraju Kusumanchi wrote:


If I do

   ctrl-W ctrl-]

in normal mode, vim splits the current window horizontally. Is there any way 
to achieve the same functionality but  with window being split vertically 
instead of horizontally?
 


Here's another solution:

nmap:exe 'vert sta '.expand("")

Regards,
Chip Campbell



Re: split vertically at a tag

2006-10-17 Thread A.J.Mechelynck

David Thompson wrote:

--- "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote:
If any ex-command splits a window horizontally, you can make it split 
vertically by prefixing it with ":vert[ical]" or open a new tab by prefixing 
it with ":tab". Since the ":winc[md]" ex-command is equivalent to the Ctrl-W 
prefix, and since Ctrl-W Ctrl-] is equivalent to Ctrl-W ] you can do


:vert winc ]

If you want Ctrl-W Ctrl-] to _always_ split vertically, you can use

:map:vertical wincmd ]

This will leave Ctrl-W ] available to split horizontally as an exception.


Hmm, I found on vim6 this still splits horizontally,
but it works correctly on vim7.

Regards,

David


Searching the version6.txt helpfile (for Vim version 7.0) brings up the 
following item:


Patch 6.2.423
Problem:":vertical wincmd ]" does not split vertically.
Solution:   Add "postponed_split_flags".
Files:  src/ex_docmd.c, src/globals.h, src/if_cscope.c, src/tag.c

If your "vim6" is earlier than 6.2.423 then IMHO it seriously needs an upgrade 
(Vim 6.3 and 6.4 were released before 7.0 became the "official" stable build.)



Best regards,
Tony.


Re: split vertically at a tag

2006-10-17 Thread David Thompson
--- "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote:
> If any ex-command splits a window horizontally, you can make it split 
> vertically by prefixing it with ":vert[ical]" or open a new tab by prefixing 
> it with ":tab". Since the ":winc[md]" ex-command is equivalent to the Ctrl-W 
> prefix, and since Ctrl-W Ctrl-] is equivalent to Ctrl-W ] you can do
> 
>   :vert winc ]
> 
> If you want Ctrl-W Ctrl-] to _always_ split vertically, you can use
> 
>   :map:vertical wincmd ]
> 
> This will leave Ctrl-W ] available to split horizontally as an exception.

Hmm, I found on vim6 this still splits horizontally,
but it works correctly on vim7.

Regards,

David


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: split vertically at a tag

2006-10-17 Thread A.J.Mechelynck

Kamaraju Kusumanchi wrote:

If I do

ctrl-W ctrl-]

in normal mode, vim splits the current window horizontally. Is there any way 
to achieve the same functionality but  with window being split vertically 
instead of horizontally?


thanks
raju



If any ex-command splits a window horizontally, you can make it split 
vertically by prefixing it with ":vert[ical]" or open a new tab by prefixing 
it with ":tab". Since the ":winc[md]" ex-command is equivalent to the Ctrl-W 
prefix, and since Ctrl-W Ctrl-] is equivalent to Ctrl-W ] you can do


:vert winc ]

If you want Ctrl-W Ctrl-] to _always_ split vertically, you can use

:map:vertical wincmd ]

This will leave Ctrl-W ] available to split horizontally as an exception.


Best regards,
Tony.