On 15/10/11 13:23, Roger wrote:
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:
nowfh was already default here.
was ea, but I set to noea.
eadirection=both was default too.
set wmw& wmh is 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!
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!
Next, I should be able to do this with CLI VIM(?).
-- Roger
http://rogerx.freeshell.org/
The snippet I proposed above should work equally well in console mode as
is does in GUI mode, provided that the executable was compiled with
+windows and (for the :let statement) with +eval.
Note that you can't really test +eval in a script, because in a Vim
compiled with -eval the :if...:endif construct is a nestable comment.
This shouldn't matter here since bracketing the whole snippet with :if
has('windows')...:endif will avoid errors in all cases — and we aren't
interested in split-windows' relative sizes when in a Vim which can't
even split windows.
Best regards,
Tony.
--
Don't believe everything you hear or anything you say.
--
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