Is there a way to fix the size of a window in vim? In a way that when I do a Ctrl-W _
, it would maximize the current window but the one I fixed the size would stay same.
To resize all windows to equal dimensions based on their splits, you can use Ctrl-w = . To increase a window to its maximum height, use Ctrl-w _ . To increase a window to its maximum width, use Ctrl-w | . In Gvim and vim in terminals with mouse support, it is also possible to use the mouse to resize a window.
I think the options you're looking for are:
set wfh
set wfw
(set WinFixHeight, set WinFixWidth)
You can set them on the window that you want to stay the same, but unfortunately only Ctrl-W =
listens to that, not Ctrl-W _
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With