Fold and Unfold current selection

Use case or problem

In large document with many headings it is often easiest to just fold all headings and then manually unfold one heading. But, because I like having both Fold Headings and Fold Indent enabled, when doing this via hotkey, I have to manually unfold all the lists within the heading that I unfolded to begin working on.

Proposed solution

If I could simply select a range of lines which contain folded lists and then press the hotkey for Unfold causing just the selection to be unfolded, this process would be much easier.

Related: Added hotkeys for Fold Headings and Fold Indents

Thanks!

4 Likes

yes, this is important, I’m dealing with long documents with a lot folds and indents. Folding and unfolding hundreds of lines is very inefficient, plus I lose my position on the screen.

1 Like

The “Fold more” command folds the nearest foldable parent item. So it will fold the current section’s heading as long as the cursor isn’t in an indented list item or parent of one (if it is, the command will fold that section of list instead).

I am not 100%, but I think it might be possible you were thinking section rather than selection. Either that or possibly you typed section and meant selection. However, what you wrote makes sense in the context of using “section,” so I believe this was just a misunderstanding.

In my request, after making a selection of a range of lines in a note, it would be possible to fold or unfold all within the selection, regardless of their initial fold/unfold state.

Thanks! Forgive me if I am mistaken.

Yes, I meant section. I was addressing the use case rather than the proposed solution — or at least I thought I was. Somehow I got a different, related problem in my head and addressed that instead. :see_no_evil: Sorry!

(I was thinking of when you want to fold the section above the current one, which is a hassle because you have scroll back up and find the heading.) (Or use the Outline. Anyway…)

1 Like

No worries! I totally understand and agree!

+1 ! A feature like the one you proposed be great for large document !

In the meantime, another workaround is the plugin Obsidian Zoom that can be useful to avoid information overwhelm in large document.

1 Like