Skip to content

Add syntax fold support #56#75

Open
zanona wants to merge 2 commits into
othree:masterfrom
zanona:patch-1
Open

Add syntax fold support #56#75
zanona wants to merge 2 commits into
othree:masterfrom
zanona:patch-1

Conversation

@zanona

@zanona zanona commented Jun 2, 2016

Copy link
Copy Markdown

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 added 2 commits June 2, 2016 18:28
Add code folding support by implementing syntax that will fold all tags except [void elements](http://www.w3.org/TR/html-markup/syntax.html#syntax-elements). This was an implementation suggested at http://vi.stackexchange.com/a/2333/3334.
@zanona

zanona commented May 12, 2017

Copy link
Copy Markdown
Author

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

@othree

othree commented Aug 23, 2017

Copy link
Copy Markdown
Owner

Hi

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

@zanona

zanona commented Aug 23, 2017

Copy link
Copy Markdown
Author

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.

@othree

othree commented Mar 8, 2018

Copy link
Copy Markdown
Owner

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.

@zanona

zanona commented Dec 4, 2019

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants