Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio not closing curled bracket

For some reason, on a new computer, Visual Studio won't auto-close curled brackets.

if(Username.Text.Equals()) {

And it doesn't auto-close. Works perfectly on all other machines I've installed VS2010 on. And now it just won't.

And there doesn't seem to be a setting in the options menu to alter this behavior. What do I need to do?

like image 872
KdgDev Avatar asked Jun 04 '11 15:06

KdgDev


2 Answers

I'm not sure if this is actually built in to vs2010. But you can install the MS Productivity Power Tools (Productivity Power Tools for Visual Studio 2012) Which will give you brace auto completion. this is quite a common add in so maybe the other copies of VS you have tried have it installed??

like image 83
Mark Staff Avatar answered Oct 05 '22 21:10

Mark Staff


Visual Studio will auto-format matching pairs of brackets as you type, but I have never seen this on Visual Studio 'out of the box'.

According to this Microsoft Connect entry, it's officially not on VS2010, having been cut due to time priority issues vs time constraints.

However, add ons like the free Microsoft Productivity Power Tools, or the not-so-free JetBrains ReSharper will add this functionality for you. Perhaps you had one of these (or other similar) add-ons installed in the other computers you have previously worked on.

like image 34
Gustavo Mori Avatar answered Oct 05 '22 22:10

Gustavo Mori