Fold/Unfold headings up to specific level hotkeys

+1 for this feature request.

I think it would be even enough (if possible) to use only one hotkey for folding and by using this hotkey multiple times it always folds one header-level more, starting with the smallest header in the note. So you press it once, H6 folds, you press it twice, H5 folds and so on.

A different hotkey would be assigned for unfolding the same way.

2 Likes

+1 for this feature request from me, too.

My rationale:

  1. I migrate to Obsidian from MindMapping
  2. Obsidian is great, but with hundreds of notes (=nodes in my case) is overwhelming: without (un)folding I’m exposed to a lot of textual information, much more than 5-7 objects acceptable by human working memory
  3. In mind-maps I can (un)fold a given node only one level down. In Obsidian it depends on the former heading/indent state, but “unfolding” unfolds all the levels down.

My suggested reference model in Mind Manager, similar to org-mode mentioned by @santi.

So, if I could, I would give +10 for this feature :slight_smile:

3 Likes

@santi It might actually be possible, although globally, not context sensitive. Did you try this?

1 Like

this worked perfectly thank you for that, I was really in need for this! it might not be a user friendly way to do it, but it was pretty easy specially with a text editor that formats JSON nicely.

I would also love this feature, which I use heavily in OneNote. Here are the keyboard shortcuts there.


image

2 Likes

Related feature requests:

I think it may be nice to either have hotkeys or modifier clicks on the arrows to fold all levels beneath current, unfold all levels beneath current, fold all levels except those between current and its currently most unfolded sub-level, fold all except current, unfold all levels to the depth of current, etc…

I am sure there are some other good ones I don’t have here. Personally, I like modifier clicks on arrows. For example alt-click arrow may be good for fold all except this level. Ctrl-click arrow feels like unfold sub-levels could work. Some of the other more nuanced ones may benefit from hotkeys.

If this is already a topic, I apologize. I promise I did do a few searches. Thanks for everything.

Life is good; and so is Obsidian.

6 Likes

I would really like to see a feature similar to VS Code where level-specific collapsing is allowed.

The feature for them is implemented with Ctrl+1 for level 1, Ctrl+2 for level 2, etc. I would also love to see the option to fold different levels show up on the Ctrl+p menu.

This is an example of what I would like to accomplish using only the keyboard, instead of having to manually click every arrow:

Level 3 folded

12 Likes

I like this idea.

1 Like

My mistake, I always use the Ctrl+Shift+P menu to do it, so I just wrote what the shortcut says without thinking.

Command menu

What you actually have to do is the Ctrl+K command, then Ctrl+1 or Ctrl+2 based on what level you want. Sorry!

1 Like

Bumper for a much needed request.

Adding to the tread, I would like:

the option to fold/unfold only the lists, a default setup for folding status every time I open a link (like always have unfolded H1 and H2 but the rest of headings and lists folded), and also the bug that when you have checklists folded but you check a checkbox from a different list, all checkboxes unfold.

Maybe a plugin that addresses this issue on the outline section could do, but it should also include the option of folding only lists (and checkboxes).

It really annoys me that the folding and unfolding is not remembered by the system.
I would love to stay folded even if I re-open it.

You will be happy to see that the feature you are requesting is implemented in 0.11.0 according to thread in this link here: Remembering heading and indent collapse in notes

However, this thread is about being able to quickly fold and unfold to a certain level. It is also a thread where some people’s requests for additional types of hot keys as they relate to folding have been merged. See here: Fold/Unfold headings up to specific level hotkeys - #12 by I-d-as . I make this distinction to avoid this thread being closed with this newly implemented feature that you are requesting.

I hope this is not interpreted that I am expecting this to be closed or that I am annoyed my request was merged here. I am just making it clear. I think the moderators do an excellent job on this forum and very much appreciate them!

Thanks.

1 Like

Found this feature request while searching to see if heading-level folding shortcuts had already been requested (e.g. CTRL+1, CTRL+2… CTRL+6) . However I see Santi has done an excellent job of recording the many features associated with folding:

I agree these would be awesome.

3 Likes

+1 for this feature request.
Would love to see this implemented.

1 Like

I would also find this very helpful

1 Like

+1 This would be very helpful!

I also would love this. It’s one of the few bottlenecks in my obsidian workflow

1 Like

Me too. This would be a really essential feature if some clever person can programme a plug in to do it.