Add syntax fold support #56
Add code folding support by implementing syntax that will fold all tags except void elements. This was an implementation suggested at http://vi.stackexchange.com/a/2333/3334.
Hey @othree, are you interested in merging this PR? Please let me know. I can close it, otherwise.
Thanks in advance and all the best
Hi
Sorry I a very busy for a while. I am wondering why you choose these tags? Any reference or usage data
No worries @othree, Sure. These are classified as HTML void elements: https://www.w3.org/TR/html5/syntax.html#void-elements Meaning that all tags, except void ones, can have content declared between start and end tags and can be foldable.
So the regex will fold any html tag that is not to be matched within this list.
I hope this helps.
Hi, I am willing to merge. But there are bugs and now its conflicted to current reversion. Can you rebase your PR and fix this:
containedin=htmlHead,htmlH\d
htmlH\d is not valid.
Hi @othree, just revisiting this and it seems that HTML folding is supported natively on vim now? If that's the case we can close both this and #56