135

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.

EDIT: Currently I'm using MSVS 11 with these extensions:

  • AnkhSVN
  • Concurrency Visualizer
  • PreEmptive Analytics Aggregator Visualizer
  • MSVS PerfWatson
  • VsGraphicsDebuggerPkg
  • Web Tooling Extensions

Most of them must have been pre-installed with msvs installation, since I cannot recall installing them by myself ;)

EDIT2: I'm using msvs in this version: Version 11.0.50323.1 QRELB

EDIT3:
I found out the problem does not occur in currently available msvs11.

3
  • 1
    Do you have an extension like ReSharper. I am not aware of any built in functionality to do this.
    – cadrell0
    Jun 15, 2012 at 17:56
  • I edited my question so it respondes to your question.
    – SOReader
    Jun 15, 2012 at 18:20
  • It must be something new to Visual Studio 11, which I believe was renamed 2012. You may want to use the version specific tag since you are using a beta/rc.
    – cadrell0
    Jun 15, 2012 at 18:59

9 Answers 9

191

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:

enter image description here

9
  • 1
    Alas it doesn't have any effect on the Watch Window among other things. Dec 18, 2014 at 0:35
  • 1
    Doesn't work in VS2012 as per the question's tag. The Resharper suggestion from another answer's comments does however work. Apr 9, 2015 at 11:10
  • 18
    But is there a way to disable the completion of double-quotes instead of just the braces. When you start type the opening double-quotes, it completes the closing one and that's annoying for me (wasn't like that until VS2013)...
    – TheCuBeMan
    Jul 27, 2015 at 12:58
  • 1
    For C/C++ it's just Tools > Options > Text Editor > c/c++ > Automatic brace completion
    – Doug Null
    Jan 14, 2016 at 19:19
  • 8
    In VS 2015 it has been moved from C# to All Languages. Sep 21, 2016 at 22:56
39

If anyone is by chance using Resharper you may also want to adjust the settings in

(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.

4
  • The first one of those is what worked for me (btw I'm not using C# but C++ with ReSharper C++). Changing the Visual Studio settings in the VS options wasn't enough. Jun 18, 2016 at 13:52
  • 2
    To add to my previous comment: changing the R# setting alone isn't enough either. Both the VS settings and the R# setting needs to be changed. Jul 21, 2016 at 14:59
  • This also works for Visual Studio 2017 with the latest edition of ReSharper. Oct 18, 2017 at 9:40
  • I don't understand the difference between these two settings. I turned both off! Aug 18, 2022 at 12:45
31

For Visual Studio 2017:

C# only:

Tools > Options > Text Editor > C# > General > Automatic brace completion

All languages:

Tools > Options > Text Editor > All Languages > General > Automatic brace completion

5
  • 7
    Doesn't work in VS 2017. It doesn't save this option. Oct 30, 2017 at 16:25
  • @JanMacháček I seem to have left out the "Text Editor" part of the path. You should be able to find it now.
    – Soenhay
    Nov 7, 2017 at 14:00
  • Works in VS 2019, too
    – Aria
    Nov 28, 2020 at 18:51
  • Doesn't work for quotes!!!
    – Yola
    Aug 24, 2022 at 14:16
  • Tested in VS2022 and it still works for brackets and quotes.
    – Soenhay
    Sep 7, 2022 at 15:43
12

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.

Once downloaded go to Tools - Options - Productivity Power Tools - then on the right you will see auto Brace Completion. Turn off!

3
  • 1
    I didn't mention it because I'm not using it - that's the only reason. Unfortunatelly PPT did not run under msvs 11 @ the time I was installing the IDE.
    – SOReader
    Jun 15, 2012 at 18:35
  • 1
    Well my last stab at it. you can install re-sharpers 30 day trail and then turn it off. Under options - Environment - Editor
    – retslig
    Jun 15, 2012 at 20:05
  • @retslig, That fixed my vs 2010 brace completion issue! Thanks.
    – Chris
    Jan 4, 2013 at 16:27
10

To turn off the double-quote auto complete for XAML in Visual Studio 2015, it is:

Tools -> Options -> Text Editor -> XAML -> Miscellaneous -> Attribute quotes
1
  • 3
    Thank you. It is terrible in the XAML editor. I don't know how they thought it would be a productivity gain to have to reach over to End, ->, or Del as you're trying to type your XAML.
    – xr280xr
    Sep 23, 2019 at 22:56
6

For those using the 2017 mac version of visual studio: Preferences > Text Editor > Behavior > Automatic Behaviors > "Insert matching brace"

enter image description here

2
  • This answer does not answer how to turn off automatic quote completion. Does anyone know how to do this? Examining the same areas of Visual Studio 2017, I don't find a command for quotation marks and auto-completion. Aug 14, 2018 at 15:16
  • This setting doesn't seem to actually disable auto brace insertion. Does VS for Mac need to be restarted? Tried closing and reopening the file, no luck. Using vs vim extension, wonder if that's conflicting...
    – Max
    Dec 11, 2018 at 5:09
1

Version 17.2.3 of Visual Studio: Tools -> Options -> Text Editor -> C# -> Uncheck Automatic Brace Completion

0

Regarding ReSharper, you might also need to Clear chaches after adjusting settings as Nate Cook described.

enter image description here

1
  • Hi @albin, this will look like a comment, unless you add some more information that make your answer a complete solution to the original question. Oct 19, 2019 at 15:17
0

Click on Tools / Options menu, go to Text Editor / All Languages / General and then disable the option "Automatic brace completion".

You can also search for the option using the keyword 'brace'

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.