skip to Main Content

In Eclipse I can just type /* and enter, and it would form a perfect comment block for complex comments above the code:

/*
 *
 */

How to do the same or similar in Visual Studio?

2

Answers


  1. What language? I’m going to assume C++.

    Tools > Options > Text Editor > C/C++ > Advanced > Brace Completion > Complete Multiline Comments > True

    This setting will do exactly what you describe. Typing /* will auto-complete the */ and any new line entered after /* will auto-insert a new * at the beginning of the line.

    Alternatively:

    1. Download and install Visual Assist: https://www.wholetomato.com/
    2. Highlight code to be commented.
    3. Shift + 8 or * on the keypad.
    4. Profit.
    Login or Signup to reply.
  2. You can just select the code you want to comment and press ctrl + /

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search