问题描述
我使用的是 VS 2010,当我输入else"然后它自动返回行并添加大括号时,我总是很恼火.类似于:
I'm using VS 2010, and I'm getting constantly annoyed when I type "else" and then it auto returns line and adds braces. Something like:
else
{
}
我无法想象我是唯一一个经常在 else 之后放置单行并且不喜欢大括号的人.我如何阻止这种情况发生?
I cannot imagine I'm the only one who often puts one-liners after the else and prefers no braces. How do I stop this from happening?
推荐答案
好吧,终于搞清楚这是怎么回事了.我在这台机器上安装了 ReSharper,显然else"关键字是一个 ReSharper 自动完成关键字.因此,即使在我关闭大括号完成之后,ReSharper 仍在添加它们.愤怒.为了阻止这种情况,您必须关闭 ReSharper 自动完成功能.
Okay, finally figured out what the hell is doing this. I have ReSharper installed on this machine, and apparently the "else" keyword is a ReSharper autocomplete keyword. So even after I turned off the braces completion, ReSharper was still kicking in and adding them. Rage. In order to stop this, you have to turn off the ReSharper autocomplete.
这篇关于停止 VS 2010 在 else 关键字之后自动创建大括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!