I use Vim version 8.2

I have e.g. 5 windows.

I have made these of equal height by normal command

  1. first question:

How to write this to be executed as :excommand in the EXcmd line?

  1. second question:

I want to resize one of these windows to make it higher by e.g. 3 lines by:

resize +3



and to make the other 4 windows of equal height each, now a smaller height as before.

How can I acomplish that?


1 Answer 1


An alternative to Ctrl-w= is:

:wincmd =

To resize the other windows to equal height with the exception of the current one you could do:

set winfixheight
wincmd =
set nowinfixheight

The total script being:

res +3
set wfh
winc =
set nowfh
  • 1
    Thanks to Vivian De Smedt:: This is a very great gain for me, the code does just what I have needed ever. I will incorporate this code in the collection of important commands. I my case as Excmd line, with bar "|" as delimiter. Very many thanks. Regarda. Jan 9 at 15:34
  • You are welcome :-) Thanks for the feedback @Anton! If it solve your problem maybe could you validate the solution using the green v flag next to the voting buttons :-) Jan 9 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.