Shortcut to make all split screens have the same width?

When I open gvim -S (with a session) my split screens' widths are screwed up and I have to manually adjust them.

Is there a shortcut to make all split screens the same width ?

Thanks


Solution 1:

This should normally work:

    C-w=
see window-resize

There are exceptions with windows that maintain a minimum/maximum width. This is frequently the case with 'sidebar' style plugins (taglist, nerdtree); In which case it is probably only what you wanted when they don't resize.

Solution 2:

From the vim help pages:

CTRL-W =    Make all windows (almost) equally high and wide, but use
            'winheight' and 'winwidth' for the current window.
            Windows with 'winfixheight' set keep their height and windows
            with 'winfixwidth' set keep their width.