Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic folding/collapsing of specified HTML tags (ie. <svg>) on file load #84844

Closed
nereusz opened this issue Nov 14, 2019 · 3 comments
Closed
Assignees

Comments

@nereusz
Copy link

nereusz commented Nov 14, 2019

I would like to make PHP Storm fold specific tags on file open.

I have a file with SVG image inline:

        <div class="btn-header">
          <div class="btn-inner">
            <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
              <path class="stroke" d="M6,1V11"
                    style="fill: none;stroke-linecap: square;stroke-linejoin: round;stroke-width: 2px" />
              <path class="stroke" d="M11,6H1"
                    style="fill: none;stroke-linecap: square;stroke-linejoin: round;stroke-width: 2px" />
            </svg>
            <span>Add</span>
          </div>
        </div>

But just after a few such elements HTML is getting messy. Code is much clearer when I fold this tag. Then I see only one line for whole image:

        <div class="btn-header">
          <div class="btn-inner">
            <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">... (folded)
            </svg>
            <span>Add</span>
          </div>
        </div>

It's much clearer. But now I need to fold them manually.

I see is as list of tags that are collapsed by default when I open HTML file (for me it's SVG, but maybe someone would like to add other tags).

@vscodebot
Copy link

vscodebot bot commented Nov 14, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@nereusz
Copy link
Author

nereusz commented Nov 14, 2019

I've checked it. Unfortunately it's not relevant.

@aeschli
Copy link
Contributor

aeschli commented Nov 15, 2019

dup of #40338

@aeschli aeschli closed this as completed Nov 15, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants