always make the split windows equal size

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

always make the split windows equal size

Kamaraju Kusumanchi-3
Let's say I open file1 in gvim. Now inside gvim window, I do

:sp file2

Now the size of both split windows is same. But let's say I maximize
the gvim window. Then the sizes of these split windows will not be
same and I have to do ctrl-= to make them equal. Is there any way to
make the size of the split windows always equal relative to each
other?

thanks
raju

--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: always make the split windows equal size

Peter Hodge-2
Hello,

You could can start with

  :set equalalways

However on my Mac, vim doesn't seem to notice when I change the window size.
I'm using vim 6.2 and found in the TODO section of the docs that a WinResize
autocommand has been requested, but I can't say whether or not it has been
implimented in a later version of Vim.

At any rate, you could map a function key to make life a little easier

  :nmap <F12> <C-W>=

HTH,
Peter


--- Kamaraju Kusumanchi <[hidden email]> wrote:

> Let's say I open file1 in gvim. Now inside gvim window, I do
>
> :sp file2
>
> Now the size of both split windows is same. But let's say I maximize
> the gvim window. Then the sizes of these split windows will not be
> same and I have to do ctrl-= to make them equal. Is there any way to
> make the size of the split windows always equal relative to each
> other?
>
> thanks
> raju
>
> --
> Kamaraju S Kusumanchi
> http://www.people.cornell.edu/pages/kk288/
> http://malayamaarutham.blogspot.com/
>



               
____________________________________________________
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search
http://au.local.yahoo.com


               
____________________________________________________
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search
http://au.local.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Fwd: always make the split windows equal size

Kamaraju Kusumanchi-3
In reply to this post by Kamaraju Kusumanchi-3
Sorry. The previous email was sent to keith's email address instead of
the list's address.


---------- Forwarded message ----------
From: Kamaraju Kusumanchi <[hidden email]>
Date: Oct 31, 2005 8:44 PM
Subject: Re: always make the split windows equal size
To: "Keith W. Roberts" <[hidden email]>


> :set ea
>
> :h 'ea'
>
> -Keith
>
>
I added this option to my .vimrc but I did not get the desired behavior.

May be I am doing something wrong. But the above does not seem to work
in Debian unstable, gvim 6.4.1 under kde 3.4.2 . Does it work for
anybody else?


thanks
raju

--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/