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.

10 Likes

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.

2 Likes

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.

1 Like

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.

3 Likes

Thank you. That plug-in is great!

1 Like

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.

1 Like

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.

1 Like

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!

1 Like

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