Comment/uncomment multiple code

I’m trying to use the command ⌘+/ to comment/uncomment multiple lines of code in Python /rhino Mac, but it doesn’t work. Any suggestion? Thanks, Roy

In Windows it’s Ctrl+Shift+C or U, so maybe Cmd+Shift+C or U ?

Thank you for your reply. Unfortunately, they don’t work (Cmd+Shift+C or U) too. Maybe there is a bug on the Mac version? Does nobody have the same issue?

Actually Ctrl+Shift+C or U doesn’t work either in the Windows version of ScriptEditor, but only in the old EditPythonScript editor.

Ctrl / currently works as a toggle in the Windows script editor. Can’t find anything on Mac so far.

There is this item in YouTrack
https://mcneel.myjetbrains.com/youtrack/issue/RH-79802/Add-Ctrl-shortcut-to-comment-out

On 8.4 windows it works using ctrl+k ctrl+c/u
Same combination as on vs code
No specific setup in my enviroment.

Not here… (8.4.24037.15001, 2024-02-06)

ctrl+C would be copy, no?


python 3 component.

Sequence in one go with block highlighted. Works fine here.

I guess you’re talking about the GH scripting component. This thread is about the script editor in Rhino, not GH. Your image above doesn’t show much…

CTRL+k+c comment
CTRL+k+u uncomment

This works on c# script editor.
Rhino 7. Windows.

OK, this also works here in the Rhino 8 ScriptEditor, but only if you press Ctrl+K and then wait a half second or so before pressing C or U. Sometimes it works if you go faster, sometimes not. I find this somewhat unwieldy in addition to being unreliable.

On Mac the same thing works with Cmd+K, then C or U. Also as unreliable as the Windows side.

2 Likes

Indeed, I never understood these needlessly convoluted shortcuts, but I guess they are inherited from the Monaco editor. Ideally one should only have to hold down Ctrl and press one key that is available on any keyboard type/local (i.e. not /). I’ve been using TexStudio for many years, where the comment/un-comment shortcut is Ctrl + T, which works just fine.

Thanks a lot!