Setting the maximum size for vertical windows in vim

When working with split windows, I often use the command to evenly distribute all the windows. However, I also use the mini-buffer explorer in a vertical window, which I want to keep to a maximum width of 25. Is there any way that I can configure vim so that either the mini-buffer browser window does not get a size or not at maximum width 25 °

Thank!

+3
source share
2 answers

You can do

:set winfixwidth

in the window you want to leave the same.

Cm

:help winfixheight
:help winfixwidth
+4
source

Here is the part minibufexpl.vim:

"               If you would like a vertical explorer you can assign the column
"               width (in characters) you want for your explorer window with the
"               following .vimrc variable (this was introduced in 6.3.0):
"
"                 let g:miniBufExplVSplit = 20   " column width in chars
"
"               IN HORIZONTAL MODE:
"               It is now (as of 6.1.1) possible to set a maximum height for
"               the -MiniBufExplorer- window. You can set the max height by
"               letting the following variable in your .vimrc:
"
"                 let g:miniBufExplMaxSize = <max lines: defualt 0>
"               
"               setting this to 0 will mean the window gets as big as
"               needed to fit all your buffers. 

This will help solve your problem.

+1
source

Source: https://habr.com/ru/post/1780274/


All Articles