vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Question: How to disable the leading space on a single-line comment?

Open iwt-christianseidlitz opened this issue 4 years ago • 1 comments

I'm not sure where else to put this, feel free to point me to the correct location for such a simple question :)

Question: How can i configure omnisharp or the vscode-extension in such a way, that i can quickly create the expected result for code-comments: Actual: "// // xyz" Expected/Desired: "////xyz"

Problem: A specific analyzer we use makes a difference between code-comments and "normal" text comments. To detect the difference, it uses "//" for normal comments, and "////" for code-comments. In vscode it is simply impossible to quickly comment out code in a conform manor.

Pressing ctrl+k+c twice will create something strange like "// // xyz", making it necessary to go there and delete the space manually.

There should be an option to disable the space after the comment-slashes, or configure the different ways of making comments, as vscode seems to make a difference between ctrl+k+c and ctrl+/

iwt-christianseidlitz avatar Jan 19 '21 17:01 iwt-christianseidlitz

"editor.comments.insertSpace": false

mubed avatar Jul 02 '24 11:07 mubed

Closing as answered.

JoeRobich avatar Nov 12 '24 23:11 JoeRobich