Vim Markdown Folding?

后端 未结 12 1459
梦毁少年i
梦毁少年i 2020-12-08 07:10

I just realized that VIM 7.3 has built-in support for highlighting Markdown files. Excellent. However, it doesn\'t fold on the headings.

Can any offer suggestions on

12条回答
  •  青春惊慌失措
    2020-12-08 07:41

    let g:markdown_folding = 1
    

    You can enable markdown folding feature by adding this in your .vimrc if you are using the latest version of Vim - no need to be the latest, but I don't know the exact version.

    For some reason it's not documented in the README but you can find the related code in the repository.

    FYI, if you don't want the sections closed when you open a file, refer to this SO thread. I think adding this would be the best way but you may have a different preference.

    set nofoldenable
    

提交回复
热议问题