C# 如何在 Visual Studio 中关闭括号/引号自动完成
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11055800/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to turn off brackets/quotes auto-completion in Visual Studio
提问by SOReader
As it states in the title: how to I turn off brackets/quotes/curly braces autocompletion in MSVS? I'm interested in C# and XAML mostly but other text editors would be nice too.
正如标题中所述:如何在 MSVS 中关闭括号/引号/花括号自动完成功能?我主要对 C# 和 XAML 感兴趣,但其他文本编辑器也不错。
EDIT: Currently I'm using MSVS 11 with these extensions:
编辑:目前我正在使用带有这些扩展的 MSVS 11:
- AnkhSVN
- Concurrency Visualizer
- PreEmptive Analytics Aggregator Visualizer
- MSVS PerfWatson
- VsGraphicsDebuggerPkg
- Web Tooling Extensions
- AnkhSVN
- 并发可视化工具
- PreEmptive Analytics Aggregator Visualizer
- MSVS PerfWatson
- VsGraphicsDebuggerPkg
- Web 工具扩展
Most of them must have been pre-installed with msvs installation, since I cannot recall installing them by myself ;)
他们中的大多数肯定已经预装了 msvs 安装,因为我不记得自己安装过它们;)
EDIT2: I'm using msvs in this version: Version 11.0.50323.1 QRELB
EDIT2:我在这个版本中使用 msvs:版本 11.0.50323.1 QRELB
EDIT3:
I found out the problem does not occur in currently available msvs11.
EDIT3:
我发现当前可用的 msvs11 中没有出现此问题。
回答by retslig
I realize you did not mention the Productivity Power Tools, however it is very easy to turn off with this. This package can be downloaded via nuget I believe.
我知道你没有提到生产力电动工具,但是很容易关闭它。我相信这个包可以通过 nuget 下载。
Once downloaded go to Tools - Options - Productivity Power Tools - then on the right you will see auto Brace Completion. Turn off!
下载后转到工具 - 选项 - 生产力电动工具 - 然后在右侧您将看到自动支撑完成。关掉!
回答by Bob Horn
If anyone is having this issue with VS 2013, there is a setting for this now. I just reset my VS settings and it started to complete my braces again. For me, it wasn't productivity power tools. You can turn it on/off here:
如果有人在 VS 2013 中遇到这个问题,现在有一个设置。我刚刚重置了我的 VS 设置,它又开始完成我的牙套了。对我来说,它不是生产力动力工具。您可以在此处打开/关闭它:


回答by Nate Cook
If anyone is by chance using Resharper you may also want to adjust the settings in
如果有人偶然使用 Resharper,您可能还想在
(Resharper Menu, Options) - Environment -> Editor -> Editor Behavior
and
和
(Resharper Menu, Options) - Environment -> Intellisense -> Completion Behavior
according to your personal preferences, in addition to the built-in Visual Studio settings mentioned by others.
根据你的个人喜好,除了其他人提到的内置Visual Studio设置。
回答by Vince I
To turn off the double-quote auto complete for XAML in Visual Studio 2015, it is:
要在 Visual Studio 2015 中关闭 XAML 的双引号自动完成,它是:
Tools -> Options -> Text Editor -> XAML -> Miscellaneous -> Attribute quotes
回答by Soenhay
For Visual Studio 2017:
对于 Visual Studio 2017:
C# only:
仅 C#:
Tools > Options > Text Editor > C# > General > Automatic brace completion
工具 > 选项 > 文本编辑器 > C# > 常规 > 自动大括号完成
All languages:
所有语言:
Tools > Options > Text Editor > All Languages > General > Automatic brace completion
工具 > 选项 > 文本编辑器 > 所有语言 > 常规 > 自动大括号完成

