preservim / vim-markdown

Markdown Vim Mode
4.67k stars 521 forks source link

Auto :Toc + no headers = mixed up syntax highlighting #349

Open mwcz opened 6 years ago

mwcz commented 6 years ago

Recording explains it better than I can (sorry for the speed, the gif plays a little too fast):

vim-markdown-no-headers

I set up auto-invoking of :Toc as described in #166, but when I open a file that has no headers, a "No headers" warning appears, followed by the file opening without syntax highlighting. More specifically, it has the coloring of the Toc quickfix window instead of markdown syntax.

I'm now back to running :Toc manually to get around this problem, but thought I'd report it anyhow in case it's something others have run into.

Thanks for this awesome plugin! It's made writing markdown much more pleasant.

ErrorTzy commented 4 months ago

I updated a solution in #166