I often use the
<C-w>| commands in Vim to maximize the current pane to fill the entire window (I have it keymapped to
And I've recently started using a tiling window manager, which means I sometimes find myself "moving" terminals into smaller or larger sections of the screen.
What happens is, say I have a vim instance in the lower right portion of my screen, with the current pane "maximized" to full view.
If I set that "tile" with the vim instance to be the active tile, it will move it to the main tile which takes up, say, 65% of the left side of the screen. This means the entire vim window itself now takes up a larger width and height and because of that, the active pane is no longer "fullscreen" based on this adjustment. Which means I need to rerun the
<C-w>0 command in order for it to "recalculate" the pane dimensions so it fills up the now larger window space.
How could I have this done automatically? Maybe something to the effect of:
Upon window resize, if the active pane had previously been maximized, re-run the maximize command. Similarly, if the
<C-w>= had been previously ran, then re-run the resize all panes to be equal command.
Maybe it could tie in somehow to Vim's
Thanks in advance for any help or pointers!
EDIT: I've started reading about VimScript, will look into writing my first Plugin to hopefully address this need :)