Visual Studio 代码格式化插件(等号自动对齐、注释自动对齐等)

1、下载地址

插件:Code alignment  下载地址

2、介绍

Based on principles borrowed from mathematics and other disciplines, code alignment gives extra meaning to your code by lining up similar data in columns. This is something we do naturally when working with tables and spreadsheets, but unfortunately it doesn't get applied to code often enough.

The usual excuses are, "It's too hard. It takes too long. They don't pay me enough." With this extension, these excuses are no longer valid.

支持等号自动对齐,注释自动对齐,自定义对齐模式等功能;

3、安装方法

下载文件如下图所示:

双击即可安装;注意:最低版本为:visual studio 2010

安装后,重启Visual Studio.可以看见工具条如下图所示:

4、效果

自动对齐注释:

对齐前:

操作:选中欲对齐的内容,点击Align by按钮,自定义对齐模式为  "//":

对齐后:

 

等号对齐:

对齐前:

操作:选中欲对齐的内容,点击工具条上的=号:

对齐后效果:

4、高级功能

正则表达式

 

 

 

 

转载于:https://www.cnblogs.com/stevensfollower/p/4392618.html

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
为了代码看起来更整齐,就希望能把赋值等号和单行注释对齐,VS2005好像没有这个功能,干脆自己动手写一个算了。 注意事项: 适用于VS2005中文版,VS2008没有测试。VS2005英文版下貌似不能加载,好像是一个VS2005安装sp1后的bug吧,我还没搞清楚。 要使用等宽字体,比如新宋体。VS2005环境设置,字体选择框中显示为粗体的是等宽字体。 安装方法 Steps to Install CodeFormater Add-In for Visual Studio 2005MapGuide 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). 4y3d\~k-l0 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”,即可。 格式整理前: 格式整理后: 大家试用一下,有什么意见和建议,可以给我回复或留言。 以后会加上右键菜单功能,这个还没弄好:)并且会把编写过程写出来,呵呵
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值