Vim折叠-标记打开的折叠

Vim折叠-标记打开的折叠,vim,folding,Vim,Folding,是否有办法查看当前文件中打开的折叠的位置? 我个人在打开折叠和四处移动时有问题,我无法找到折叠的起始线!也许有一个选项可以在数字旁边设置一个漂亮的折叠提示。也许是这样: + 1 void myfunc(void) { | 2 printf("Hello World\n"); | 3 printf("Goodby World!\n"); - 4 } 5 6 void anotherfunc(void) ... 那太好了!我已经用过google,也用过vim帮助,但是没有办

是否有办法查看当前文件中打开的折叠的位置? 我个人在打开折叠和四处移动时有问题,我无法找到折叠的起始线!也许有一个选项可以在数字旁边设置一个漂亮的折叠提示。也许是这样:

+ 1 void myfunc(void) {
| 2     printf("Hello World\n");
| 3     printf("Goodby World!\n");
- 4 }
  5
  6 void anotherfunc(void)
...
那太好了!我已经用过google,也用过vim帮助,但是没有办法做到这一点

亲切问候,, musicmatze

试试看
:设置foldcolumn=1

如果需要更多折叠列,请使用下面的示例使用
:se fdc=3
(快捷方式)


一点提示可能会有所帮助。 如果要更改折叠颜色,请执行以下操作: 如果您使用的是gvim:

:highlight Folded guibg=grey guifg=blue
:highlight FoldColumn guibg=darkgrey guifg=white
但如果您正在从终端使用vim:

hi Folded ctermbg=black
我在vimrc中的设置是:

colorscheme desertEx
"some modifications to the colorscheme
"to view current settings use for instance ':hi Folded'
set foldcolumn=3
hi FoldColumn ctermfg=216
hi FoldColumn ctermbg=black
hi Folded ctermfg=216
hi Folded ctermbg=black