0

By the normal mode command :vs, I split the current buffer into two equally sized buffers. Then I resize the whole terminal window and only find the left portion of the screen remains the same as before resizing, while the right portion changes its size. Consequently, the splitted buffers no longer take the same size. How could I make them keep the same size when I resize the window?

1

When you have several split you can equalize their size with ctrlw+= or with the equivalent command :wincmd =. So you could use that manually.

I you want to use the command each time Vim's window is resized you can use an autocommand like this:

autocmd VimResized * wincmd =

Which means when the VimResized event is received, no matter what buffer you are editing (*) use the command wincmd =

Some related help topics:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.