Visual Studio 2012 中的花括号自动完成

Curly braces autocomplete in Visual Studio 2012(Visual Studio 2012 中的花括号自动完成)
本文介绍了Visual Studio 2012 中的花括号自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚从 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 中的花括号自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)