How to (un)comment multiple lines of code in Studio
A quick question. What's the shortcut to uncomment multiple lines of code in Studio? And what's the shortcut to comment out multiple lines of code in Studio?
Thanks in advance!
A quick question. What's the shortcut to uncomment multiple lines of code in Studio? And what's the shortcut to comment out multiple lines of code in Studio?
Thanks in advance!
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
There are comment/uncomment options for both single lines and blocks, including keyboard shortcuts:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
So: Ctrl+/ and Ctrl+Shift+/ should help.
Good luck!
Does it work for you? I have 2022.2 and it doesn't work I press and nothing happens.
Ive never tried the CTRL+ options before but teh CYRL+/ didnt work for me either.
Im not sure that keyboard shortcuts is what you are asking for though as /* comments out anything below it and */ terminates the commented lines i.e,
set A=1
/*
set A=2
set B=A
*/
write A // (which now equals 1)
write B // (which now causes an error)
quit
Sure, I know /* */ work.
But students use different IDEs so they get used to some behavior and adding multiline comments is apparently one of them. In my Studio it shows like this and the menu works but the shortcuts don't.
It seems there are different Studio versions around that cause confusion,
Could be a Keyboard dependency ?
I use a German keyboard where # is close / on a US keyboard,
might be * or ! on a French keyboard (just guessing)
I don't really care what are the exact keystrokes, I just want them to work, and they don't
Make sure that you select the whole lines, so that first character on each line is selected
Ok, I found it. It was Ctrl+/
But I have several / on my keyboard and only the one on the main keyboard (with letters) works.
Hi Iryna!
Sorry, but I just saw your post now.
In my job we are already programming using VsCode.
If you are going to use it, you can follow the tips of the links:
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...
or
https://www.youtube.com/watch?v=VnceVuRXxKA