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.

SOReader
  • 5,697
  • 5
  • 31
  • 53
  • 1
    Do you have an extension like ReSharper. I am not aware of any built in functionality to do this. – cadrell0 Jun 15 '12 at 17:56
  • I edited my question so it respondes to your question. – SOReader Jun 15 '12 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 '12 at 18:59

9 Answers9

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

Bob Horn
  • 33,387
  • 34
  • 113
  • 219
  • 1
    Alas it doesn't have any effect on the Watch Window among other things. – Roman Starkov Dec 18 '14 at 00:35
  • 1
    Doesn't work in VS2012 as per the question's tag. The Resharper suggestion from another answer's comments does however work. – nathanchere Apr 09 '15 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 '15 at 12:58
  • 1
    For C/C++ it's just Tools > Options > Text Editor > c/c++ > Automatic brace completion – Doug Null Jan 14 '16 at 19:19
  • To add to @DougNull's comment, I found it convenient to disable it in "Tools -> Options -> Text Editor -> All Languages" and be done with it. – Stefan Monov Jul 21 '16 at 15:08
  • 8
    In VS 2015 it has been moved from C# to `All Languages`. – Stephen Hosking Sep 21 '16 at 22:56
  • 1
    Why in the name of god this option is not shown in the Text Editor -> C# settings when you search for 'brace' is beyond me... http://imgur.com/a/vW2Z2 – fostandy Oct 19 '16 at 06:40
  • Works for VS2017! "Tools -> Options -> Text Editor -> All Languages" – Just a HK developer Jun 22 '17 at 08:45
  • in vs 2015 it keeps reverting to checked after unchecking once per day. I set it in the morning and the rest of the day I am ok until the next day and I have to uncheck it again. – Mike Jun 26 '17 at 14:23
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.

Nate Cook
  • 8,395
  • 5
  • 46
  • 37
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

Soenhay
  • 3,958
  • 5
  • 34
  • 60
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!

retslig
  • 888
  • 5
  • 22
  • 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 '12 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 '12 at 20:05
  • @retslig, That fixed my vs 2010 brace completion issue! Thanks. – Chris Jan 04 '13 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
Vince I
  • 570
  • 5
  • 22
  • 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 '19 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

pretzels1337
  • 355
  • 3
  • 10
  • 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. – Su Llewellyn Aug 14 '18 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 '18 at 05:09
2

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

HypoXSyn
  • 51
  • 3
0

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

enter image description here

albin
  • 607
  • 6
  • 10
  • 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. – Giulio Caccin Oct 19 '19 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'

Gautam Jain
  • 6,789
  • 10
  • 48
  • 67