问题描述
刚从 vs10 迁移到 vs12,花括号似乎与 C# 中的缩进等其他一些功能一起完全损坏(?)例如输入:
public static void myFunc() {
在 Visual Studio 10 中,它会自动为其添加右花括号.是否有一些电动工具或其他东西可以解决这个问题并给出相同的行为?Brace Completer 需要在函数后按 Enter添加右大括号.
同样在tools->options->text-editor->c#->formatting->自动格式化完成的块在}
默认开启..
Visual Studio 2010 默认不这样做(至少在我的情况下不是).你确定你没有使用像 Productivity Power Tools
这个支持VS2012:http://visualstudiogallery.msdn.microsoft.com/0e33cb22-d4ac-4f5a-902f-aff5177cc94d
Just migrated from vs10 to vs12 and it seems like the curly braces is completely broken along side with some other features like indentation in C# (?) for example type:
public static void myFunc() {
In visual studio 10 it would automatically add the closing curly brace for it. Is there some power tool or something that can fix this and give the same behavior? the Brace Completer requires to hit Enter after the function for it to add the closing braces.
Also in tools->options->text-editor->c#->formatting-> automatically format completed block on }
is turned on by default..
Visual Studio 2010 doesn't do that by default (at least not in my case). Are you sure you weren't using an extension like Productivity Power Tools
This one supports VS2012: http://visualstudiogallery.msdn.microsoft.com/0e33cb22-d4ac-4f5a-902f-aff5177cc94d
这篇关于Visual Studio 2012 中的花括号自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!