[wish] [rhino8 script editor] Collapse All Classes / Functions

Was just searching google to see if it was possible to collapse all classes and functions in Rhino’s python editor (I have a very long script and it must be a single file), and I found this thread. Turns out ctrl+shift+- (control-shift-minus) will do it. There is also an option to collapse all definitions in the editor’s context menu.

I was very excited, but it doesn’t work in Rhino8’s script editor, the key combo doesn’t do anything and the context menu doesn’t have that option (but it does work in Rhino7’s editor).

So, I was hoping we could get this functionality in Rhino8’s editor as well.

@webdunce There is a “Fold Definitions (Level 1)” command in the editor

It does not have a keyboard shortcut. I can also add more for other levels.

1 Like

Thanks. Nice to know. Level two would be nice (or even just “all”). I have a massive class and it’s helpful to collapse all the def sections. To be clear, at least for now, I don’t need to collapse for loops or if…else sections or anything, just defs and classes.

But it’s low priority (for me). I can always just switch to Rhino7, which has a collapse all definitions feature.

1 Like

Ok. I made a specific ticket to get this improved

RH-83655 Match “Collapse All Definitions” behaviour in legacy script editor