Mike Webb
Mike Webb

Reputation: 9003

How would I specify a window in Vim to be max height when switching to it?

Right now when I open a new window I do <ctrl> w n and then I resize it with <ctrl> w _.

Also when switching windows I do <ctrl> w <arrow-key> until I get the window I want and then <ctrl> w _ again to set it to max size.

How do I make the windows always resize to the max height when I switch to it? Is there a better way or better set of key strokes to accomplish what I am asking?

I'm pretty new to Vim so any help and suggestions is appreciated.

Upvotes: 0

Views: 335

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172688

You're asking for the so-called Rolodex mode:

:autocmd VimEnter * set winheight=999

This makes the current window fill most of the screen. For more information, see :help 'winheight'

Upvotes: 3

Related Questions