【问题标题】:Setting a maximum size for vertical windows in vim在 vim 中设置垂直窗口的最大尺寸
【发布时间】:2010-12-14 19:07:51
【问题描述】:

在使用拆分窗口时,我经常使用该命令将所有窗口的大小相等。但是,我还在垂直窗口中使用迷你缓冲区资源管理器,我想保持最大宽度为 25。有没有什么办法可以配置 vim,以便迷你缓冲区资源管理器窗口不会重新调整大小或保持不变最大宽度为 25?

谢谢!

【问题讨论】:

    标签: ide editor vim


    【解决方案1】:

    你可以的

    :set winfixwidth
    

    在您希望保持不变的窗口中。

    :help winfixheight
    :help winfixwidth
    

    【讨论】:

    • 谢谢!其实这个问题困扰了我很久。为了使 mini buffer explorer 每次启动 vim 时都有固定的高度,只需在 plugin/minibufexpl.vim 的第 701 行,在 "call DEBUG( '已完成 StartExplorer()' ,10)".
    【解决方案2】:

    这里是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. 
    

    这应该有助于解决您的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-26
      • 2015-12-02
      • 2014-10-30
      • 2013-04-30
      • 1970-01-01
      相关资源
      最近更新 更多