天天看点

VS2005插件,自动对齐赋值等号与注释

为了代码看起来更整齐,就希望能把赋值等号和单行注释对齐,VS2005好像没有这个功能,干脆自己动手写一个算了。

适用于VS2005中文版,VS2008没有测试。VS2005英文版下貌似不能加载,好像是一个VS2005安装sp1后的bug吧,我还没搞清楚。

要使用等宽字体,比如新宋体。VS2005环境设置,字体选择框中显示为粗体的是等宽字体。

Steps to Install CodeFormater Add-In for Visual Studio 2005

--------------------------------------------------------

1. Close all instances of Visual Studio 2005.

2. Copy the .addin and .dll files to your Addins directory (usually C:\Documents and Settings\[User]\My Documents\Visual Studio 2005\Addins).

   If you do not have an Addins directory, create it under your "Visual Studio 2005 "directory.

3. That's it. The next time you open Visual Studio 2005 the CodeFormater add-in will be available.

1。关闭所有的VS2005实例。

2。拷贝.addin 和.dll文件到Addins目录。通常是C:\Documents and Settings\[User]\My Documents\Visual Studio 2005\Addins

3。可以了,下次在运行VS2005,你就会发现“工具”下面多了两个“CodeFormater”和“InserDateTime”

使用方法:

选中要进行格式化的代码段,点“工具”--〉“CodeFormater”,即可。

VS2005插件,自动对齐赋值等号与注释

格式整理前:

VS2005插件,自动对齐赋值等号与注释

格式整理后:

VS2005插件,自动对齐赋值等号与注释

大家试用一下,有什么意见和建议,可以给我回复或留言。

以后会加上右键菜单功能,这个还没弄好:)并且会把编写过程写出来,呵呵 

 下载:

<a href="http://files.cnblogs.com/junqilian/CodeFormater.zip">CodeFormater.zip</a>

10KB

2008/4/7 20:48:19

<a href="http://files.cnblogs.com/junqilian/CodeFormater.zip">Download</a>

源码下载:

<a href="http://files.cnblogs.com/junqilian/CodeFormater_src.rar">CodeFormater_src.rar</a>

45KB

2008/4/9 21:26:03

<a href="http://files.cnblogs.com/junqilian/CodeFormater_src.rar">Download</a>

制作过程:

http://www.cnblogs.com/junqilian/archive/2008/04/09/1145733.html

邮箱:[email protected] 

转载请保留此信息。

本文转自峻祁连. Moving to Cloud/Mobile博客园博客,原文链接:http://www.cnblogs.com/junqilian/archive/2008/04/07/1140963.html,如需转载请自行联系原作者

继续阅读