1

How can I show open folds in vim? (i.e., folds that are currently open)

e.g., show the open folds within the text somehow, like marking the lines;
or perhaps show them as a list (e.g., like the :jumps command that shows a list of jumps)

Rob Bednark
  • 25,981
  • 23
  • 80
  • 125

1 Answers1

3

I don't know that folds can be listed, but marking of lines is possible using the foldcolumn option. (:help 'foldcolumn'). Try

set foldcolumn=12

Caveat: per the documentation, if nofoldenable is set, open folds will not be shown in the foldcolumn.
[foldenable] can be toggled with the *zi* command. The 'foldcolumn' will remain blank when 'foldenable' is off. [:help foldenable]

Rob Bednark
  • 25,981
  • 23
  • 80
  • 125
Amadan
  • 191,408
  • 23
  • 240
  • 301