patch 9.0.0342: ":wincmd =" equalizes in two directions

Problem:    ":wincmd =" equalizes in two directions.
Solution:   Make ":vertical wincmd =" equalize vertically only and
            ":horizontal wincmd =" equalize horizontally only.
This commit is contained in:
Bram Moolenaar
2022-08-31 17:49:14 +01:00
parent 92a3d20682
commit 21c3a80a7f
8 changed files with 99 additions and 33 deletions

View File

@ -256,9 +256,16 @@ and 'winminwidth' are relevant.
*:vert* *:vertical*
:vert[ical] {cmd}
Execute {cmd}. If it contains a command that splits a window,
it will be split vertically.
it will be split vertically. For `vertical wincmd =` windows
will be equialized only vertically.
Doesn't work for |:execute| and |:normal|.
*:hor* *:horizontal*
:hor[izontal] {cmd}
Execute {cmd}. Currently only makes a difference for
`horizontal wincmd =`, which will equal windows only
horizontally.
:lefta[bove] {cmd} *:lefta* *:leftabove*
:abo[veleft] {cmd} *:abo* *:aboveleft*
Execute {cmd}. If it contains a command that splits a window,
@ -553,6 +560,10 @@ CTRL-W = Make all windows (almost) equally high and wide, but use
'winheight' and 'winwidth' for the current window.
Windows with 'winfixheight' set keep their height and windows
with 'winfixwidth' set keep their width.
To equalize only vertically (make window equally high) use
`vertical wincmd =`
To equalize only horizontally (make window equally wide) use
`horizontal wincmd =`
:res[ize] -N *:res* *:resize* *CTRL-W_-*
CTRL-W - Decrease current window height by N (default 1).