11

Is it possible to have different set of colors for folds and subfolds, eg:

  • blue foreground on grey background for fold level 1 (default)
  • black foreground on dark yellow background for fold level 2
  • etc... (although going further down would seem a bit excessive)
4

3 回答 3

5

这取决于您使用的是 Gui Vim 版本还是文本版本。从我这边(文本版本)我已经在我的 .vimrc 中设置了

hi Folded ctermfg=Black
hi Folded ctermbg=DarkGrey
于 2017-07-11T12:13:36.137 回答
4

来自 vim 文档:

COLORS                          *fold-colors*

The colors of a closed fold are set with the Folded group |hl-Folded|.  The
colors of the fold column are set with the FoldColumn group |hl-FoldColumn|.
Example to set the colors: >

        :highlight Folded guibg=grey guifg=blue
        :highlight FoldColumn guibg=darkgrey guifg=white

所以你不能轻易做到这一点。我能给你的最好建议是尽可能设置状态栏以显示当前折叠级别。

于 2010-10-14T06:30:10.017 回答
3

我有一个简单的 Vim c 代码补丁,可以让你很容易地设置它。如果您希望补丁重新编译 Vim,或者如果您使用的是 Windows,请告诉我,我可以向您发送 Vim 7.2 的补丁可执行文件。

于 2010-10-14T06:58:25.010 回答