Credits to Ingo Karkat, you just need to set
foldcolumn for using the mouse to open and close folds. From
'foldcolumn' is a number, which sets the width for a column on the side of the
window to indicate folds. When it is zero, there is no foldcolumn. A normal
value is 4 or 5. The minimal useful value is 2, although 1 still provides
some information. The maximum is 12.
An open fold is indicated with a column that has a '-' at the top and '|'
characters below it. This column stops where the open fold stops. When folds
nest, the nested fold is one character right of the fold it's contained in.
A closed fold is indicated with a '+'.
Where the fold column is too narrow to display all nested folds, digits are
shown to indicate the nesting level.
The mouse can also be used to open and close folds by clicking in the
- Click on a '+' to open the closed fold at this row.
- Click on any other non-blank character to close the open fold at this row.
Even though it says
2 is the minimal useful value, I'd say
1 is enough (
Higher values make a better visual experience, but you still need to hit the
On a side note, this section is the only instance of the word