开发者

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,开发者_JAVA百科 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!

P.S. 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.


create a code snippet for them


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 (e.g. word wrapping of comments and documentation comments) and support for many more programming languages and documentation block styles).


You could create a toolbar macro which inserts that text at your cursor position when you click on the toolbar icon.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜