> On Sun, Oct 09, 2011 at 11:37:56PM +0200, Tony Mechelynck wrote:
>On 09/10/11 11:08, Roger wrote:
>> Reading the good book Learning the VIM Editor(s) and see winwidth&  winheight
>> mentioned, but am having trouble getting it working here!
>>
>> Why, when settings winwidth on vertical split files, it's not automagically
>> resizing the windows as I toggle between the files?
>>
>> I have set to noequalalways, also. :-/
>>
>
>With me it does, but remember that these options are "desired minimums 
>for the current window" and that the "absolute minimums for any window" 
>are set by 'winminwidth' and 'winminheight'. When switching windows, the 
>new window will not be resized if it already exceeds the desired 
>minimum, nor will it be made bigger than would allow all other windows 
>to remain at or above the absolute minimum.
>
>Also, some special window types have their own desired minimums: see
>       :help 'helpheight'
>       :help 'cmdwinheight'
>       :help 'previewheight'
>
>The absolute minimums may be set to zero, the desired minimum for the 
>current window must be at least 1 since the currentcursor location must 
>always be visible.
>
>The following should swell the current window to maximum size, squashing 
>other windows to only a vertical divider on left and right or a status 
>line above and below:
>
>   :set nowfh                                  " no fixed size
>   :set noea eadirection=both                  " no equal size
>   :set wmw=0 wmh=0                            " squash other windows
>   :set wiw=9999 wh=999 hh=999 cwh=999 pvh=999 " enlarge current window
>   :let netrw_winsize = 100                    " netrw split to 100% size
>



For GVIM:
Variable nowfh was already default here.
Variable ea was default, but I set to noea.
Variable eadirection=both was default too.
And set wmw? wmh? were set to default 1.


Now the culprit was your wiw, wh, hh, cwh, pvh values!

My default values were set to something like these:
    winwidth=1
    winheight=1
    helpheight=20
    cmdwinheight=7
    previewheight=12

And, once I used your wiw, wh, hh, cwh, pvh values, changing focus of the
windowns and window resizing automagically happens now!

(I omitted the 'let netrw_winsize ...' statement as I currently don't want to 
resize 100% which would make it look like I have no windows in the buffer.  
Guess one could get the status line to display a letter stating there's open 
windows, etc... user preference, etc...)

The O'Reilly Learning VIM mentioned something about these values, but gave no
real set values for a reader to try on his/her own VIM session.  With your
values, I'm now rolling on customizing to my liking!  I never knew VIM could do
this!  Wonder why this isn't default or a little easier to get to the default 
behavior?

Now putting it all together into .vimrc (as I've got GVIM working above).

But now I notice I cannot use a value greater then 1 for both winminheight & 
winminwidth.  Using a value other then 0 or 1 (for both variables triggers the
following error on starting vim:

E591: 'winheight' cannot be smaller than 'winminheight': winminheight=2


I don't know about anybody else, but I think I'd prefer to see at least 1 (for
smaller displays), and maybe 3-4 for larger displays.  But now I'm also seeing 
how the incomplete text on the borders of the split windows can be distracting. 
 
Again, user preference, ...etc.


---
Roger
http://rogerx.freeshell.org/

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

Reply via email to