3
使用拆分窗口时,我经常使用该命令来平等地调整所有窗口的大小。不过,我也在一个垂直窗口中使用迷你缓冲区资源管理器,我希望它的最大宽度为25。有没有什么办法可以配置vim,使得迷你缓冲区资源管理器窗口不会被重新调整大小或停留最大宽度为25?在vim中为垂直窗口设置最大尺寸
谢谢!
使用拆分窗口时,我经常使用该命令来平等地调整所有窗口的大小。不过,我也在一个垂直窗口中使用迷你缓冲区资源管理器,我希望它的最大宽度为25。有没有什么办法可以配置vim,使得迷你缓冲区资源管理器窗口不会被重新调整大小或停留最大宽度为25?在vim中为垂直窗口设置最大尺寸
谢谢!
你可以在你想留在同一窗口做
:set winfixwidth
。
见
:help winfixheight
:help winfixwidth
这里是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.
这将有助于解决您的问题。
工作,谢谢 – 2010-12-14 19:24:15
谢谢!其实这个问题困扰了我很长一段时间。为了让迷你缓冲区浏览器在每次vim启动时都有固定的高度,只需要在plugin/minibufexpl.vim的第701行添加“set winfixheight”行,在“调用 DEBUG('Completed StartExplorer()',10)“。 –
2012-06-09 03:03:35