1

When I begin a block comment, /*, VS automatically follows up by inserting the corresopnding */ right after it. This is inconvenient for me, because my primary use case of block comments is to temporarily disable blocks of code, meaning I want to insert the */ manually.

Is there a way to turn off the autocomplete specifically, and only, for comments?

user650261
  • 2,115
  • 5
  • 24
  • 47
  • Select the code and use `Ctrl+K,C` to comment a block of code, `Ctrl+K,U` to uncomment it – Panagiotis Kanavos Jun 10 '16 at 08:55
  • See also http://stackoverflow.com/questions/27742412/disable-visual-studio-autocomplete-comment-in-javascript – Ilya Jun 10 '16 at 08:57
  • While that is useful, I'm wondering if there is a way to turn off the (very annoying) autocomplete for when I want to do it manually. – user650261 Jun 10 '16 at 08:58
  • I definitely do NOT want to turn off Intellisense. – user650261 Jun 10 '16 at 08:58
  • @MartinBonner, it is sort of a duplicate. I'm on Visual Studio 2015, so things might have changed between versions. I will update the question tags. – user650261 Jun 10 '16 at 08:59
  • 1
    It *might* have changed - but I fear not :-( – Martin Bonner supports Monica Jun 10 '16 at 09:00
  • 1
    There doesn't appear to be a setting in the IDE to disable this behavior. You will have to look for 3rd-party extensions. A (commercial) 3rd-party extension to make this more convenient is [Visual Assist](http://www.wholetomato.com/). It allows you to select a block of code and enter `*` to comment out/in that block of code, using block comments (see [Surround Selection](http://www.wholetomato.com/features/feature-coding-assistance.asp#surround) for details). – IInspectable Jun 10 '16 at 09:12
  • 1
    Still another option is to use `#if 0 ... #endif`, which works even with nested `/* comments */`. – Bo Persson Jun 10 '16 at 09:15
  • See this [thread , if you use c#](http://stackoverflow.com/questions/2307602/how-to-disable-the-automatic-asterisk-in-visual-studio-when-adding-a-multi-line) 'Tools > Options... > Text Editor > C# > Advanced > Uncheck "Generate XML Documentation comments for ///". ' – Mara Black Jun 10 '16 at 09:20

0 Answers0