Hi there! I have a problem on my Mac 2024 M3 Sonoma: when I want to comment a block of code with ##, impossible! So, has someone an idea to do this, comment and uncomment in Sonic Pi?
The only solution to comment line after line!
Thanks for attention and help!
How are you trying to do it? What version of Sonic Pi are you using?
For me it works when I press Command + “/” on macOS Sonoma using the latest Sonic Pi v5.0.0-beta-1.
Hello Emelyn, I am on the 4.5.1 version and Command + “/” doesn’t work in fact (on my PC yes it does but it’s a different keyboard)
I have to comment and uncomment line after line (with #) so it’s not very practical…
That’s strange, I just tried version 4.5.1 and that works for me too. Could it be that you have a keyboard shortcut configured (in System Settings, Keyboard, Keyboard Shortcuts) that is interfering?
As a workaround (not ideal, but maybe better than manually (un)commenting each line individually), you can use:
comment do
your_code_here
end
Then to uncomment it you can just change it to:
uncomment do
your_code_here
end
an uncomment
block runs the code normally, so you just need to add/remove two characters to (un)comment the block.
Thanks for your help! I am going to look at my keyboard configuration and if not to use this interesting method in my code…