I know that it is possible: I googled it some time ago, but now I can't find the solution.

What do I need add to .vimrc to resize my current active window in full height automatically after window changing?

  • I remember also watching a screen cast where the user would resize the inactive windows to 5 lines, to keep the context.
    – nobe4
    Apr 15 '16 at 11:43

You can do it with an auto command, filtering the WinEnter event:

autocmd WinEnter * resize

resize without argument expand the height to max.


  • :h resize
  • :h autocmd-events

If I understand what you mean by window, this should do it.

set winheight=999
set winminheight=0


:help 'winheight'
:help 'winminheight'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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