html5.vim icon indicating copy to clipboard operation
html5.vim copied to clipboard

Add syntax fold support #56

Open zanona opened this issue 9 years ago • 5 comments

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.

zanona avatar Jun 02 '16 17:06 zanona

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

zanona avatar May 12 '17 14:05 zanona

Hi

Sorry I a very busy for a while. I am wondering why you choose these tags? Any reference or usage data

othree avatar Aug 23 '17 02:08 othree

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.

zanona avatar Aug 23 '17 12:08 zanona

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.

othree avatar Mar 08 '18 03:03 othree

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

zanona avatar Dec 04 '19 16:12 zanona