简体   繁体   中英

In Visual Studio, is there a quick way to generate these types of comment blocks?

If anyone knows the name for these types of comments, if one exists, please modify my question.

I frequently see comment blocks such as this:

/**********************************************
 *          Some Important Text Here
 **********************************************/

Sometimes they can look like this:

/**********************************************
  *********  Some Important Text Here  ******* 
 **********************************************/

I've also seen them prettier than that.

They seem useful for noting sections of code, and important messages, such as license blocks. But, I feel like there *must* be a "lazy" way of doing this in Visual Studio, or at least an addon, because typing them manually is a pain.

Thanks!

PS If this feature or a point-and-click way to do it doesn't exist, then I know what VS plugin I'm writing next.

为他们创建一个代码片段

You could perhaps look at GhostDoc , it is great for writing neat, clean, consistent style commenting in your code. It uses XML markup, and can later be exported for documentation.

If you want fixed-text blocks, then add a Code Snippet for each one you need.

If you want auto-generated documentation blocks for absolutely any code element, then you might like to try my addin, AtomineerUtils . (Similar to GhostDoc, but with significantly more features, a much better documentation generation engine, better formatting control (eg word wrapping of comments and documentation comments) and support for many more programming languages and documentation block styles).

您可以创建一个工具栏宏,当您单击工具栏图标时,它将在光标位置插入该文本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM