Remember folding state

When I have a document with various levels of heading, I like to keep all levels below the one I am working on folded. For a three level document I would typically see this when working on the second level:

# Section

## Subsection

### Subsubsection A [...]
### Subsubsection B [...]
### Subsubsection C [...]

As you can see, I have indicated that the second-level heading “Subsection” contains three folded subsubsections. Now, when I fold the subsection,

# Section

## Subsection [...]

and subsequently unfold the subsection again, all my previously folded subsubsections have equally become unfolded:

# Section

## Subsection

### Subsubsection A

Text A should be folded.

### Subsubsection B

Text B should be folded.

### Subsubsection C

Text C should be folded.

Ideally, FoldingText would remember that the lower-level items are folded.

Agree. I posted recently to suggest that “fold (collapse) all” would be really useful. Likewise being able to select to what level you want to fold your file to. This is common in, for instance, mind mapping software. In lieu of that, being able to fold items, focus in to an item and then unfocus again without everything having been expanded would be great.

I’m trying to use FoldingText an organiser for me, with my whole life (work, personal, business, etc) in one file. I was using WorkFlowy, but the mobile client is rubbish whereas working on a text file is easy. But maybe it’s just too unwieldy?

Fold all— isn’t this already available?

“CMD + a” to select all.
“CMD + /” to fold/unfold all selected (if nothing’s selected, fold/unfold affects the branch that the cursor is placed within).
“CMD + alt + right arrow” to expand by level; substitute left arrow in key combination to collapse… (if nothing’s selected, fold/unfold affects the current node the cursor is placed within— i.e. has no effect on a child node at the end of a branch).

Is that what you meant, or were you looking for something else? These are regularly used shortcuts in my daily workflow!

@nte: This isn’t a direct solution for your query, but have you tried expanding by level?

Thanks JSLR. That works great for me. Not quite what I meant in that some tools let you expand/collapse all or by level without doing a “select all”. But this works super fine. :grinning:

Happy to hear that helped. If you want to get super-geeky about it, and if you already own Better Touch Tool or Keyboard Maestro, you could devise your own shortcut/macro to reduce the number of separate steps.

(That said, if you do own either of those, you probably would have done this already… ; )

Well actually… I used TextExpander and Alfred a lot, but since Alfred introduced text expansion I dropped TextExpander. I’m sure there’s all kinds of funky things I can do with Alfred to automate stuff in FoldingText and elsewhere. However Alfred’s one of those tools that I use daily but have barely scratched the surface of… one day!