Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curly braces autocomplete in Visual Studio 2012

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

like image 580
aromasca Avatar asked Aug 29 '12 12:08

aromasca


People also ask

How do I add curly brackets in Visual Studio?

Editor Related Keyboard Shortcuts Alt + Shift +arrow keys( ← , ↑ , ↓ , → ) = Select custom part of the code. Ctrl + } = Match curly braces, brackets. Ctrl + Shift + } = Select text between matched braces, brackets.

How do I see the lines that connect braces in Visual Studio?

Go to Tools->Options->Productivity Power Tools->Other Extensions and there is an option group called Structure visualizer options. In there is a checkbox for Show code structure in editor. Turn this off, and job done!

How do I change the bracket style in Visual Studio?

I. Visual studio change curly brace style(highlight braces background) "Tools" menu → Options → Environment → Fonts and Colors → Select "Brace Matching or Brace Matching(Rectangle)" under "Display items" → select a "Background Color" → OK → Finish.


1 Answers

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

like image 83
Bob Horn Avatar answered Oct 17 '22 00:10

Bob Horn