Agree or Disagree? : change the comment delimiters in VS code extension
In vscode objectscript extension, when you push "Ctrl + Slash" in the editor window, the comment delimiter "#;" is inserted. This feature helps me a lot to write comments in sources. But currently it does not have any options to change "#;" to other characters.
.png)
Some customers say "we prefer another comment style like //, so want // be put into the source in stead of #; when we push Ctrl + Slash". It makes sense to me.
I put a new request on Github "[Request] want to change the comment style from "#;" which is inserted by "Ctrl + Slash".
What do you think? Agree? Disagree? If you support my idea, please leave any comments here or Github directly 😄
As workaround, you can edit C:\Users\<username>\AppData\Roaming\Code\User\keybindings.json and insert this block there. Then, when you put "Ctrl + Slash" in the editor, // will be inserted in the source. Happy coding!
{
"key": "ctrl+/",
"command": "type",
"args": { "text": "//" },
"when": "editorTextFocus"
}Comments
Hi Seisuke,
1) Thank you for reminding about this shortcut and for sharing the associated workaround.
2) Agree.
I agree that I don't like #; as a comment BUT, I prefer ; instead, I'm not a fan of // comments, probably because I'm an old InterSystems user.
Fortunately there is a way to change it, thank you for sharing the details.
Functional Background (since decades)
- simple ; (semicolon) is passed down into the final .INT code (and generated .OBJ)
useful it working with $TEXT() function
while
- #; in CLS or MAC is skipped while compiling .INT
so it is smaller saves space
mainly useful for larger comment blocks kept for documentation