阻止Visual Studio 2013自动删除分配中的多余空间 [英] Stop Visual Studio 2013 from automatically removing extra spaces in assignments

查看:118
本文介绍了阻止Visual Studio 2013自动删除分配中的多余空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图对齐一些分配以提高可读性,但是每次粘贴某些内容时,Visual Studio 2013都会自动删除=之前的多余空格.

I'm trying to align some assignments to improve readability, but each time I paste something, Visual Studio 2013 automatically removes the extra spaces before the =.

例如,此:

static class Constants {
    public static string Something      = "A value";
    public static string SomethingElse  = "Another value";
}

重新设置格式如下:

static class Constants {
    public static string Something = "A value";
    public static string SomethingElse = "Another value";
}

是否有办法将其关闭?

推荐答案

可以通过忽略声明语句中的空格"选项在Tools->Options->Text Editor->C#->Formatting->Spacing中将其关闭.

This can be turned off in Tools->Options->Text Editor->C#->Formatting->Spacing via the "Ignore spaces in declaration statements" option.

这篇关于阻止Visual Studio 2013自动删除分配中的多余空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆