Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I customize the auto commenting text in Visual Studio?

When I type the trigger the auto comment feature in Visual Studio (by typing "'''" or "///"), most of the XML commenting details show up that I like. However, I typically add the history tag to the documentation so I can track and changes that are made to the method over time.

Is there any way I can customize the auto commenting feature so that it will add the history tag, and potentially some generic Name - Date - Change placeholder text?

like image 522
Dillie-O Avatar asked Jan 08 '09 19:01

Dillie-O


People also ask

How do I auto generate comments in Visual Studio?

The only way I know to do this is on the line right above your method just type "///" and it will generate a comment template based on the method.

How do I add comments to the toolbar in Visual Studio?

Shortcut key for comment and uncomment in Visual Studio 2019 Select the piece of code that you would like to comment on. Then click CTRL + K + C to apply comment on the selected code.

How do I toggle comments in Visual Studio?

Both VS Code and Android Studio toggle line comments with Ctrl + / . That is, when the lines are already commented out, pressing Ctrl+/ un-comment them.


1 Answers

I'd suggest using GhostDoc. It generates very smart comments using /// based on your method names and parameters. Also, it is fully customizable.

like image 120
DavGarcia Avatar answered Oct 20 '22 03:10

DavGarcia