Option to collapse code-blocks

Hello, I use a dedicated notebook for scripts, and longer code blocks can take up a significant amount of space. Would it be possible to add an option to collapse and expand individual code blocks in preview mode? This would make it much easier to navigate notebooks with multiple scripts.

Thank you!

Hi @Anthony_Contreras ,

Thanks for the suggestion. It’d be nice to be a plugin so people with the same itch could solve it, too. I’d like to keep the core features minimal and rely on plugins for personal preferences.
For example, there is a related plugin called toggle-section, which lets you fold sections:

So, you can build something similar based on it.

API docs: