Folding code blocks

I really like the new editor version! You are doing a great job! I’m exited about it!

I think - it would be awesome to fold / unfold code blocks. It would be very useful for attaching long listings (like some logs).

Hi! Thanks for your kind words :slight_smile:

We are planning to add folding, but we’re still deciding how to implement that, but this is on our list!


1 Like

Was just about to post this as an feature request and the search surfaced this previous request :slight_smile:

Now we’ve got folding for headers and list (which is pretty great) it would be really good to get folding for code blocks as well.

Folding is incredibly powerful for organizing, but I really need a way to (a) collapse or fold all levels and (b) fold to a heading level (e.g., H3 and lesser). For instance, in my work flow I paste in a set of passages and use folding to sort them. Genre, date, title, content. I would like to fold all content to the title level, for instance. Or fold everything to the root level.

You can fold a code-block by adding a header above and folding the header :slight_smile:

Second this. Folding to a particular level is extremely useful. I would go on to suggest a live TOC feature that does this automatically. Perhaps it can be activated or viewed by clicking in the top-right button area and can be set to an arbitrary depth level. This would complement folding, but also allow quick access to all the parts of the document without necessarily fiddling with folding.