如何在.NET 中自动换行注释?
我想要一个命令来自动换行 .NET 中的 XML 样式注释。
示例:
/// <summary>
/// This comment line should be
/// on one line, and other lines in this <summary> block should be wordwrapped.
/// </summary>
我不介意购买一些商业 Visual Studio 插件,如果它们能够做到这一点。
I'd like to have a single command to auto-linewrap the XML-style comments in .NET.
Example:
/// <summary>
/// This comment line should be
/// on one line, and other lines in this <summary> block should be wordwrapped.
/// </summary>
I wouldn't mind buying some of the commercial Visual Studio plugins, if they are capable of doing this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试一下 ReSharper,它声明它可以格式化 XML 文档注释(转到 此处 并搜索 XML 文档注释以获取更多信息)并倾向于非常可定制。
如果这不起作用,我能找到的最接近的东西是 CodeProject ,它适用于 Visual Studio 2003;但是它是开源的,因此您可以在不需要昂贵的第三方插件的情况下使其工作。
Try the trial of ReSharper, it states it formats XML Doc Comments (Go Here and search for XML doc comments for more information) and tends to be very customisable.
If that doesn't work, the closest thing I could find was on CodeProject , it's intended for Visual Studio 2003; however is open source so you may be able to get it working without the expensive of a third party plugin.
我为 Visual Studio 编写了一个插件,AtomineerUtils Pro Documentation 它将更新和自动换行普通注释和文档注释(XML、Doxygen、Qt 和 JavaDoc 格式)。 (它不是免费的,但非常便宜,并且有 30 天的免费试用期)
它尝试智能地保留重要的换行符 - 文本,例如缩进、项目符号列表、空行或行尾的双空格(除其他外)都将用作包装引擎的提示,以确保您的格式不会丢失。
I've written an addin for Visual Studio, AtomineerUtils Pro Documentation which will update and word-wrap both normal comments and documentation comments (in XML, Doxygen, Qt and JavaDoc formats). (It's not free, but it's very inexpensive and there's a 30 day free trial)
It tries to intelligently preserve important newlines - text such as indentation, bullet lists, blank lines or a double space at the end of a line (among other things) will all be used as hints to the wrapping engine to ensure that your formatting is not lost.
添加>在你的评论中
Add a <para /> in your comments