Stopping commenting continuation in VSCode
Wondering if there's a setting in VSCode to stop continuting commenting in VSCode?
For example, if I have
//this is a comment
and press enter at the end, it will continue on the next line with
//this is a comment //|
I would like to stop this behavior, or have it only continue with a block comment.
Is this possible in VSCode? I think it's part of the ISC extension that causes it, as it doesn't happen for other languages.
Thanks!
Comments
This doesn't fully solve the issue, but you can start/stop comments using "ctr + /". To stop commenting you would be able to press "enter" then "ctr + /", which is slightly better than having to backspace out of it.
I don't have an answer, but I also hope someone does. // is specifically for a single-line comment, so it's odd to me that it's continued like that.
The same behavior is with ";" comments. It seems to be a new feature of InterSystems ObjectScriptv2.12.1:
older versions acted similarly with "///" comments only.
I'm not sure that this innovation makes our life worse, while having the way to switch it off would be useful.
Thanks for your feedback! In response, I've submitted Pull Request #1311 which removes the comment-continuation feature for ObjectScript comments (it's still enabled for class description /// comments). It also adds auto-closing of C-style block comments (e.g. typing /* automatically adds */ after the cursor). You can try this out by downloading and installing the latest beta version of the vscode-objectscript extension from GitHub, which can be found here.
Thanks! Tested and works great.