Hotkey to toggle folded/unfolded state of current line or section (if section contains child lines)

Hi -

I would love to get a hot key to toggle folding for the current line.

I’m a pretty big user of text folding - typically in outliners - and now happily in my markdown files. So much of Obsidian is keyboard-only drivable already; I’d love to be able to fold sections of my notes away without having to reach for the mouse. Really helps keep me in the flow if I can just make stuff happen by typing.

Thanks!

26 Likes

I am surprised that this request has not appeared yet. Is it planned for future releases?

Cheers,
Bernardo

6 Likes

Related: https://forum.obsidian.md/t/hotkey-to-toggle-folded-unfolded-state-of-current-line-or-section-if-section-contains-child-lines/981

1 Like

EDIT: Confirmed. Will be implemented in 0.7.3

I believe this one will definitely should and would be implemented. I hope we will see hotkeys for default and vim mode, especially because it could be achieved without extra effort.

gif_to_share_fold

4 Likes

Sorry, it will be out in 0.7.4 instead. 0.7.3 was released to fix a quite serious folder rename issue.

10 Likes

Awesome! You all are so responsive!

Related feature request

Thanks! Going to merge these two :slight_smile:

1 Like

Is there a hotkey that can be assigned for “collapse/expand present item”? Ideally, one that toggles an outline item (including headings) open and closed? It would be great to have. OmniFocus has a good implementation: in the outline view there, you can collapse/expland one or all items.

What I would really love is also to have a way to collapse all except for the present block. That would really show the advantages of the document-based, headings-within-a-page approach: an evergreen note might be 4 pages long when fully expanded, but if there where eight h2 headings, I could quickly switch to looking at only a half-page of text (with all but one heading collapsed).

10 Likes

+1 on this one. And if possible I’d like to be able to use it with Vim mode too, using the fold keybinds. :slight_smile:

1 Like

Related https://forum.obsidian.md/t/hotkey-to-toggle-folded-unfolded-state-of-current-line-or-section-if-section-contains-child-lines/981

1 Like

Plus 1 for including zc and zo in the vim keybindings to close and open folds respectively.

Implemented as of 0.7.6.

1 Like

Hey,

Is there a reason for having separate key binds for folding/unfolding all headings & lists? C.f. toggling on the current line:

Screenshot 2020-07-14 at 17.57.39

It’d be useful to toggle the fold on all items with one key bind. Maybe I’m being short-sighted, but having separate ones seems odd. :thinking:

Thank you for making this epic software!

4 Likes

Concur. +1 for having the same key for folding/unfolding all lists and/or headings

1 Like