vim-markdown
vim-markdown copied to clipboard
Markdown folding does not work with minimal setup
Markdown folding doesn't work for me out of the box. I am guessing I am missing something obvious, but I've read through the readme and nothing is jumping out at me.
I get E490: No fold found when hitting zc hovering over a header in visual mode:

settings
Reproduce with the following ~/.vimrc (after having called :PluginInstall):
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
Plugin 'gmarik/vundle'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
call vundle#end()
And vim version 8.1:
$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 16 2018 18:20:26)
macOS version
Included patches: 1-400
Compiled by Homebrew
...
I have similar problem, at Ubuntu though: https://github.com/plasticboy/vim-markdown/issues/386
Have this problem on Arch linux
Have this problem on Lubuntu 18.04
Have you tried zX to recalculate folding? It works for me everytime, but still, an annoying problem.
Same problem in Mac as well. zX doesn't solve it.
I had the same issue and, in my case, was caused by vimwiki configured to use markdown. It appears there is a conflict so check if this is a plugin you are using. Also worth troubleshooting by disabling any other plugins with markdown functionality.
This doesn't apply to all users, but in case you're using vim-polyglot, here's why folding doesn't work: https://github.com/sheerun/vim-polyglot/issues/478
I've you're using Vim's built-in Markdown syntax file (check :scriptnames), then you'll need to :set foldmethod=expr.