Sublime Forum

How to fold everything between an opening and closing html tag?

#1

Hello,
I’m Using ST3 build 3207.
There is a feature of sublime that, a down arrow sign appears on index of every opening tag that will allow me to fold everything between the open and closing tag, when I press the arrow sign.
for example, there are 2115 lines of html code. The opening html tag is at line 2 and closing html tag is at line 2114. Now, there is a :small_red_triangle_down: (down arrow) sign appears at line 2 [which is the opening htmL tag] that fold everything till the closing html tag, and the closing tag would placed right under the opening tag …
Like this…

But the problem is this down arrow sign doesnt appears in my every opening tag, not even at the html tag !!

Does anyone understand my problem , why is this causing ???
If anyone understand the problem and know the solution, it would be very kind if let me know…
Thanks…

0 Likes

#2

Folding in ST is based on indentation, the comments at row 5 and 15 don’t respect indentation, same for <head> that should be indented aswell being a child of <html> …

0 Likes

#3

This question got asked twice, so just for the sake of completeness this is the answer to the other version of this so that they get linked together:

1 Like