【问题标题】:Vim disable autofold when I scroll down?当我向下滚动时,Vim 禁用自动折叠?
【发布时间】:2016-08-31 14:22:57
【问题描述】:

我在 vim 中启用了折叠,这里是 .vimrc snipet。

set foldmethod=syntax
set foldnestmax=1
set foldlevel=0
set foldclose=all

它工作正常,但是当我向下滚动一个 c 函数时它会自动折叠,你知道如何让折叠保持打开状态吗?

【问题讨论】:

    标签: vim folding


    【解决方案1】:

    Vim 只是按照你的指示去做;尤其是您选择的'foldclose''foldlevel' 组合。来自:help 'foldclose'

    'foldclose' 'fcl'   string (default "")
            When set to "all", a fold is closed when the cursor isn't in it and
            its level is higher than 'foldlevel'.  Useful if you want folds to
            automatically close when moving out of them.
    

    如果您不喜欢这种行为,只需删除 set foldclose=all

    【讨论】:

      猜你喜欢
      • 2012-02-25
      • 1970-01-01
      • 2017-11-30
      • 2010-09-12
      • 2017-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多