Question

When I start gvimdiff, the two windows occupy 50% of the window width. Exactly what I want.

However, when I then maximize the gvimdiff window via the window manager, the width of the left window stays as is and all the extra width is allocated to the right window. Is there a way to keep the window width 50/50 when maximizing (or more generally, for any horizontal resize operation)?

Was it helpful?

Solution

I don't think there's an option for this. You can get close with an autocmd for the VimResized event:

autocmd VimResized * normal ^w=

Where ^w is produced by Ctrl-v+w. Or without control characters:

 autocmd VimResized * exec "normal \<C-w>="
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top