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…
Hello, I have the same problem with my two versions (4.51 and 5 beta MacbookM1 silicon). On screen it’s ok. But it has no effect without completely interrupting the process. however, when I restart it, the commented block is mute. and it becomes active again when I uncomment it.
The "comment do …end » trick has exactly the same effect.
For me, the only thing that works is “stop” and “#stop” at the beginning of my Live_loop block…
Maybe a bug with Silicon Macs?
Works for me on with MPB with M2 chip on Ventura and with M4 Mac mini on Sequoia
Hi @Kleepo maybe a bug with Silicon Macs but for Robin @robin.newman it seems to work, so I don’t understand very well .Anyway, comment and uncomment are working well on My MBP M3 so it’s ok…
Et bonjour Ă Bordeaux de Strasbourg !
Thanks for your feedback, it was a guess, and obviously it’s not that. In practical terms, it’s not too annoying, “stop” and in the vast majority of cases very effective. Still, I hope this can be taken into account for the future. Version 5 and these new keyboard shortcuts have changed my life.