vim-markdown icon indicating copy to clipboard operation
vim-markdown copied to clipboard

Markdown folding does not work with minimal setup

Open ryantuck opened this issue 7 years ago • 8 comments

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:

screen shot 2018-10-25 at 11 48 56 am

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
...

ryantuck avatar Oct 25 '18 16:10 ryantuck

I have similar problem, at Ubuntu though: https://github.com/plasticboy/vim-markdown/issues/386

Netrieb avatar Nov 01 '18 23:11 Netrieb

Have this problem on Arch linux

justinmoon avatar Nov 25 '18 01:11 justinmoon

Have this problem on Lubuntu 18.04

xerron avatar Mar 12 '19 12:03 xerron

Have you tried zX to recalculate folding? It works for me everytime, but still, an annoying problem.

blue-cloak avatar Mar 21 '19 15:03 blue-cloak

Same problem in Mac as well. zX doesn't solve it.

0xhmn avatar Dec 04 '19 22:12 0xhmn

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.

dathinaios avatar Apr 03 '20 17:04 dathinaios

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

nicoqh avatar Apr 03 '20 18:04 nicoqh

I've you're using Vim's built-in Markdown syntax file (check :scriptnames), then you'll need to :set foldmethod=expr.

bitwombat avatar May 20 '21 04:05 bitwombat