masukomi / vim-markdown-folding

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

Slow when syntax is off #16

Closed denten closed 9 years ago

denten commented 9 years ago

The plugin adds more than 2000ms to start up when syntax if off. This, I believe, is due to the lineisfenced() function that uses an `hassurroundingmarks()' that has slow regex parsing (well, slower than the syntax highlighter).

nelstrom commented 9 years ago

This is by design.

I'm being opinionated in my assumption that people who enable folding will already have syntax highlighting enabled. If syntax highlighting is disabled, I provide a fallback folding function which does the job but with poor performance.