Monday, September 6, 2010

Re: Fwd: How to keep windows size unchanged?

在 2010-09-06一的 07:15 +0000,G H写道:
>
>
> 2010/9/5 AK <andrei.avk@gmail.com>
> You can use this function:
>
> func! DelBuffer()
> let bufname=expand('%')
> bnext
> exe ":bdelete " . bufname
> endfunc
>
> -ak
>
> thanks ak.
>
> But maybe because I didn't have my problem described clearly, so as to
> make you misunderstood.
> I'm sorry for that.
> This function works well, but the result is not what I want. Thank you
> very much after all.
>
> OK, let me attach some figures to explain again, it may take you some
> time to check, sorry again,
> but I can't think of a better way.
>
> BeforeSplitting.png: the window layout before I split a new window.
> AfterSplitting.png: the window layout after I split a new window.
> AfterQuiting.png: the window layout after I quit the recently splitted
> window.
>
> You can find the window layout is changed in AfterQuiting.png
> correspond to that in BeforeSplitting.png,
> which is not I want to see.
>
> How to figure this out?
>
> thanks again
>

I think it's 'equalalways' option that deals with it. Read below:

*'equalalways'* *'ea'* *'noequalalways'*
*'noea'*
'equalalways' 'ea' boolean (default on)
global
{not in Vi}
When on, all the windows are automatically made the same size
after
splitting or closing a window. This also happens the moment the
option is switched on. When off, splitting a window will reduce
the
size of the current window and leave the other windows the same.
When
closing a window the extra lines are given to the window next to
it
(depending on 'splitbelow' and 'splitright').
When mixing vertically and horizontally split windows, a minimal
size
is computed and some windows may be larger if there is room.
The
'eadirection' option tells in which direction the size is
affected.
Changing the height and width of a window can be avoided by
setting
'winfixheight' and 'winfixwidth', respectively.
If a window size is specified when creating a new window sizes
are
currently not equalized (it's complicated, but may be
implemented in
the future).


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