문제

Still really new to vim, I have the following question: having installed this vim plugin, how to enable that a fold of, e.g, a section collapses all sub-sections? I don't have to stick to the referenced plugin, any other will do as well.

The current status, for example, is (I'm trying to visualize how my vim looks like):

# Section 1 [4 lines]------------------....
## SubSection 1 [3 lines]--------------....
## SubSection 2 [10 lines]-------------....
# Section 2 [5 lines]------------------....
## SubSection 1 [5 lines]--------------....

What I would like to get in addition is:

# Section 1 [19 lines]------------------....
# Section 2 [11 lines]------------------....

Unfolding this state results again in the first example.

Best, /nm

도움이 되었습니까?

해결책

This is covered by the documentation, see :help markdown-folding-configuration. Put the following into your ~/.vimrc:

let g:markdown_fold_style = 'nested'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top