Sublime Forum

Can't collapse all text indents

#1

I am using Sublime to plan some folder structures and I noticed that I can’t collapse all my indented sections, maybe just 80% of them. Can’t figure out what makes some work and some don’t as in some cases the contents are identical. To be clear this is when the document is plaintext (saved as .txt)

CantCollapse

0 Likes

#2

Folding in Sublime is currently based on indentation, and there need to be at least two lines at any given level for a fold arrow to appear. This is because folded text is replaced with a special fold marker, so if you fold a single line you’re not saving any space at all.

You can manually fold anything you like with the Edit > Code Folding > Fold menu item though (see the menu for the key binding associated with it).

0 Likes

#3

Ah I see. It makes sense you can’t collapse a single line but I think you should be able to collapse any line that has just one indented line below. But now I know I needed two indented rows so I’ll just fill it out with “…” in those cases so I can close them.The manual folding command seems to work ok though. Thank you.

0 Likes