Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim (window-resize): how do I easily make the windows equally high for only one column?

Tags:

vim

neovim

I have a vertically split window and the window is further horizontally split within each column. I want to make the height of the windows within one column the same, but do not want to change the heights within the other (let's say, one window in the other column is set to highest possible, like by using CTRL-W_, and I don't want to change that). What is the easiest way possible to accomplish this?

like image 230
someneat Avatar asked Mar 09 '23 09:03

someneat


1 Answers

If the equalalways is on (it is by default), closing a split resizes the remaining splits to be equal. So just create a new split and then close it.

:new | q

Mapping it to a key (e.g. Leader+eq) would look like so:

nnoremap <Leader>eq :new \| :q<cr>
like image 161
Ondra Simek Avatar answered Apr 29 '23 06:04

Ondra Simek