Gökhan Sever
Gökhan Sever

Reputation: 8482

Preserving equal sized split view

I start GVIM in not-maximized window mode and split its window horizontally making sure the windows are equally sized. How can I preserve this equal-sized split view when I maximize the main GVIM window? Whenever I maximize GVIM forgets that the windows have been equally split.

Thanks.

Upvotes: 21

Views: 5237

Answers (1)

Cascabel
Cascabel

Reputation: 496902

The command to equalize splits is ^W= (ctrl-W =), or in a script, wincmd =.

To do this automatically, you can use:

autocmd VimResized * wincmd =

Upvotes: 36

Related Questions