masukomi / vim-markdown-folding

Fold markdown documents by section.
248 stars 43 forks source link

markdown folding not working if I open a non-markdown file first #44

Open LittleGreenFrog opened 3 years ago

LittleGreenFrog commented 3 years ago

I'm using MacVim 8.2.261. I have installed folding.vim so that it is found by vim. (vim 8 packages) I have verified that it is found by running :scriptnames. I have verified that foldmethod=expr.

If I choose to edit a markdown file first thing on opening vim, it folds properly - it opens in a completely folded state and I can open and close the folds as expected using the vim keys.

However, if I open .vimrc first (for instance) and then open a markdown file, it opens completely unfolded and fold command are ignored.

I have discovered, though, that if I source folding.vim after that, then folding works again.

I'm reasonably certain I have set everything up as stated in the GitHub site. Do you have any idea what might be going on?