Automatic folding of specified HTML tags (ie. <svg>)

Hi All!

I'm wondering if is there any way to make PHP Storm fold specific tags on file open. What I mean?

I have a file with SVG image inline:

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

It's much clearer. I wonder if it is possible to make PHP Storm to fold selected tags (for me it's SVG, but maybe someone would like to add other tags) when I open every file. Now I need to fold them manually. 

If not, is there any chance to add such feature?

Best regards,
Przemyslaw

0
2 comments

No, it's not possible; please feel free to file a request for this feature to youtrack, https://youtrack.jetbrains.com/issues/WEB

 

I'd suggest surrounding your svg blocks with folding comments:

<!--<editor-fold desc="my svg tag">-->
<svg>...</svg>
<!--</editor-fold>-->

and enabling Custom folding regions in  Settings | Editor | General | Code Folding

0
Avatar
Permanently deleted user

Thanks, I try that, but with hundreds of pictures it's a lot of fixing...

I've made na request: https://youtrack.jetbrains.com/issue/WEB-31301

0

Please sign in to leave a comment.