Visual Studio的改变方式按Ctrl-K-D作品 [英] Visual Studio changing the way Ctrl-K-D works

查看:917
本文介绍了Visual Studio的改变方式按Ctrl-K-D作品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中(我使用的是2012),有编辑方式中的任何方式,<大骨节病>控制 - <大骨节病> K - <大骨节病> D 组合处理其自动格式化

In Visual Studio (I'm using 2012), is there any way of editing the way that Ctrl-K-D combinations handles its Auto-Formatting?

我不意味着改变一下这些组合键,我的意思的扩展的方式自动-formatting完成

I don't mean changing what these key combinations do, I mean extending the way the auto-formatting is done.

事情是这样处理的 Tab键的等都是很好,我更关心的是空格

The way it handles tabbing, etc are fine, I'm more concerned with white-space.

我们正在使用一个插件,可以很容易地调整变量属性,使它们易于阅读。像这样:

We're using a plugin that makes it easy to align variable properties, making them easy to read. Like so:

var test            = 'whatever',
    another         = 'this one',
    alignedProperly = 'yay';



似乎nitt挑剔肯定的,但在真正的大对象的文字是如此的帮助才能够阅读!

Seems nitt-picky yes, but in really large Object literals it's so helpful to be able to read them!

有没有人发现,其中的自动格式化的规则所在,如果他们可以编辑/改变?(找不到他们在选择的任何地方)

Has anyone found where the rules for auto-formatting are located, and if they can be edited/changed? (Can't find them anywhere in the options!)

推荐答案

您寻找:

工具>选项>文本编辑器> C#>格式>间距>设置等
间距选项>中的声明语句忽略空格

Tools > Options > Text Editor > C# > Formatting > Spacing > Set other spacing options > Ignore space in declaration statements

这是在VS 2010中,但我想2012应该是有点类似。

This is in VS 2010, but i guess 2012 should be somewhat similar.

这篇关于Visual Studio的改变方式按Ctrl-K-D作品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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