1

Okay, so, hopefully an easy question here... Visual Studio, using C++ ... and this is just an annoyance, but I've been putting up with it for three months now, it interrupts my workflow, and I just want it gone...

If I type the beginning of a block comment:

/*

...and press return, Visual studio "helpfully" starts adding asterisks on each line, like so:

/*
 *
 *
 *

And there doesn't appear to correlate with ANY of the options in the C++ text editor settings. Can someone clue me in on how to make it JUST STOP. Thank you.

Ðаn
  • 10,934
  • 11
  • 59
  • 95
John Raptis
  • 177
  • 7
  • 3
    End your comment? – sweenish Mar 28 '21 at 23:43
  • 1
    Hint: Another `/` – tadman Mar 28 '21 at 23:47
  • Dudes... I'm in the process of typing a comment and VS is adding characters I don't want in my comment. That's the point I'm making, I type /* and then I hit enter, and I want to put a blank line and then type something.... but I get a * in there and on every line. I do not want it, it's just a way I've been coding for almost 30 years now. It seems ridiculous that I should have to put up with all the latest kewl Silicon Valley Hotness in code tampering just because someone needed to justify their job on the VS team. – John Raptis Mar 28 '21 at 23:49
  • 2
    It's nothing like what you're describing, this is how the Linux kernel mandates its comments be. It's *extremely* common. I certainly prefer an obviously visible comment block to what you're describing. – sweenish Mar 28 '21 at 23:52
  • Maybe try another editor? – Russ J Mar 28 '21 at 23:56
  • https://marketplace.visualstudio.com/items?itemName=florians.CommentFormatter – Soleil Mar 29 '21 at 00:00
  • This happens for me with C# but not C++. There is an option for C# to turn that off under "Text Editor→C#→Advanced". – 001 Mar 29 '21 at 00:03
  • I ended up finding an answer... C# lets you do it in settings, but to turn it off in C++ you have to export your settings, edit the xml, and re-import it (see below) – John Raptis Mar 29 '21 at 00:08
  • 1
    Does this answer your question? [How to disable the automatic asterisk in Visual Studio when adding a multi-line comment in C#?](https://stackoverflow.com/questions/2307602/how-to-disable-the-automatic-asterisk-in-visual-studio-when-adding-a-multi-line) – Russ J Mar 29 '21 at 01:18

1 Answers1

1

Okay, there IS an answer, and I was able to find it by using different keywords: How to disable the automatic asterisk in Visual Studio when adding a multi-line comment in C#?

This answer is no longer correct, but the PROCESS is. For posterity: Export the settings, look for "continuecommentsonenter" and change it to false. Then import the settings again.

Jon P
  • 19,442
  • 8
  • 49
  • 72
John Raptis
  • 177
  • 7
  • Then please comment on the existing answer if you think it needs to be updated. Either suggest an edit or leave a comment. – Russ J Mar 29 '21 at 00:00
  • And please don't engage in generation bashing. You wouldn't like it if it was done to you. :-) – Russ J Mar 29 '21 at 00:01
  • Every update with exciting new features is another nail in my coffin. The latest Android Studio even killed off AltE+C to copy... any why? So someone can pretend they actually did work at the next performance review. Anyway, it's a millenial++ world, I'm just posting this for the other cadavers. And stay off my lawn. The other answer is 11 years old and closed, I believe this one will provide a better search hit for someone with this specific problem. – John Raptis Mar 29 '21 at 00:05
  • 1
    Actually, that's not true. New answers and updates on old questions are actually VERY common on SO, and can actually be quite helpful. It's in everyone's best interest to keep old questions current instead of repeating them. – Russ J Mar 29 '21 at 00:08
  • Aw right, aw right, I went and posted a comment there. – John Raptis Mar 29 '21 at 00:11
  • The global gathering of programmers is forever grateful. :-) – Russ J Mar 29 '21 at 00:14