Option to fold/unfold headers independently of lists

Problem

Currently, you can only fold/unfold headers and lists.

In my workflow, folding headers and lists serve different purposes.

I fold headers to eliminate visual clutter and narrow my focus.

With lists, however, they have a meaningful structure; some lists are folded and others unfolded. I find folding all lists not useful at all. Even if I were to fold all lists, I’d want to fold only the topmost level, not all levels.


Possible solution

Add options to separately fold/unfold headers and lists.

Add an option to fold only the topmost level of lists.

I support this request and like to add the option to have commands/shortcuts for folding specific header-types. Like ‘fold all H1’.
Then I could have my header outline easily folded or unfolded.

I would also love to see a separate “fold/unfold all” for headers and lists.

Specifically, it would be great to be able to unfold headers without all my lists expanding as well.

Hi, I haven’t tested this extensively but I think the Crease plugin by Liam Cain might have what you’re after. As a fellow disgruntle-ee of limited folding controls I’ve found it does exactly what I need.

Thank you. That plug-in is great!

How can the current section/header be folded and unfolded (toggle)?
Is there any solution/plugin?
Thank you!

You can assign a hotkey to the “Toggle fold on the current line” command, or just access it through the palette.

It’s uncomfortable to use it. For it to work, you have to stand on the same line as the header.

I also support this request! In the meantime, I’ve realised that it’s possible to prevent all lists from folding by toggling off ‘Fold indent’ in Editor. For me that’s a good trade off because I rarely want to collapse lists, and if I did I suppose I can just pop a header above it.
The Creases plugin suggested above seems great for some purposes but from what I could tell it doesn’t help with the issue of having to manually unfold each dot point.

In addition to “Fold all headings and list”, please also add more (un)fold commands for more granular control:

  1. Toggle fold all lists
  2. Toggle fold all headings
  3. Toggle fold for H1/2/3/4/5/6 (six separate commands)

I don’t see a reason to have separate ‘fold’ and ‘unfold’ commands. So as not to clog up the command palette w/ redundant commands, the proposed commands are toggles instead.

Plugin solutions worth mentioning:

  1. Creases adds quite a few (un)fold commands to the palette, including “Toggle fold H1/H2/etc”.
  2. Outliner adds commands to (un)fold list under cursor.

Let me know if you know more!

Related request in the vein of more (un)folding options:

Use case or problem

In cases where you are regularly wanting to intermittently fold and unfold just indents as well as fold and unfold just headings, while not losing the existing Fold All Headings and Lists and Unfold All Headings and Lists hotkeys.

Proposed solution

To add these independent hotkeys either as separate Fold and Unfold or toggle hotkeys. Although it doesn’t affect my main use case, this could potentially also have the benefit of allowing you to fold headings with the retention of the fold state of the indents contained within the affected headings.

Current workaround (optional)

Temporarily toggling the Fold Heading and Fold Indent settings. Perhaps if these settings had a hotkey, another workaround would be to set up a macro that achieved the requested function by first toggling the correct settings before triggering the Fold/Unfold All Headings and Lists hotkey and then finally returning the settings to their initial state.

Sorry if there is already a request for this. I did search and was surprised not to find anything.

Related: Fold and Unfold current selection

Edit: Just found this request: Option to fold/unfold headers independently of lists

Thanks!