Question

Is there a way to see, where are opened folds in current File? I personally have the problem when opening folds and moving around, I'm not able to find the line where the fold was started from! Maybe there is an option to set a nice-looking folding-hint next to the numbers. Maybe like this:

+ 1 void myfunc(void) {
| 2     printf("Hello World\n");
| 3     printf("Goodby World!\n");
- 4 }
  5
  6 void anotherfunc(void)
...

it would be very nice! I already used google and also used the vim-help but found no way to do this.

Kind regards, musicmatze

Was it helpful?

Solution

Try :set foldcolumn=1

if you want more fold columns indicators increase the number, the example below uses :se fdc=3 (the shortcut)

enter image description here

OTHER TIPS

A little note that may help. If you want to change the folding colors: If you're using gvim:

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

But if you are using vim from the terminal:

hi Folded ctermbg=black

My settings in vimrc are:

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top