【发布时间】:2011-08-27 23:28:45
【问题描述】:
我已经下载了适用于 VS2010 的 Productivity Power Tools 插件。我正在使用该设置自动插入右括号。但是,我似乎无法让编辑器在输入时正确格式化。可能最好用代码 sn-p 来显示我的要求:
// I will be using the pipe | to show the carret
// At this point, the closing brace is inserted:
var foo = new Foo{|
// So it becomes this:
var foo = new Foo{|}
// Now pressing enter formats it like this:
var foo = new Foo{
|
}
// BUT THIS IS HOW I WANT THE FORMATTING TO BE:
var foo = new Foo
{
|
}
// It is however formatted correctly on semilcolon:
// So this:
var foo = new Foo{
var bar = 5;|
}
// Becomes this:
var foo = new Foo
{
var bar = 5;
};|
【问题讨论】:
-
是的,我已经通过这些设置无济于事。我需要找到的是“输入格式”设置。
标签: c# visual-studio-2010 autocomplete formatting intellisense