Brace Completer

Free

Automatically adds closing braces after typing an opening brace and pressing Enter.

(21) Review
Visual Studio
2012, 2010
Download (101,496)
10/24/2012
1.6
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (21)
Q and A (5)
Sign in to write a review
Sort by:

by Salih KARAHAN | September 03 2013

Good plugins. :)

by Rodion.Sychev | March 04 2013

Good stuff

by MIkeTims | March 01 2013

Very useful

by jgagne | December 20 2012

It doesn't work for me... I have visual Studio 2012 Express Edition and any Extensions I try to add, I keep getting the error "This extension is not installable on any currently installed products.". This is a real bummer since I was really looking forward to using this extension.

Joel Spadin December 21 2012
| Edit |
Delete

The express editions of Visual Studio do not support extensions. Only the professional versions and the integrated/isolated shell support them.

by boblewis | December 03 2012

Works perfectly.

by Exe.Cute | November 01 2012

working perfect for me THX

by Kevin_Schilling | October 14 2012

This add-on has worked perfectly for me so far!

by Vlad Vasiliev | September 18 2012

Braces indentation is disabled both in plugin, and editor settings, but braces are still indented.
If auto-format (Alt + F8) is applied, indentation is fixed, but it isn't convenient. I've disabled plugin because of this.
MS VS 2010 Ultimate (10.0.40219.1 SP1Rel).

Joel Spadin September 18 2012
| Edit |
Delete

What language does this happen with?

by RamonEEZA | September 12 2012

by Sofwarer | May 01 2012

by epsue1 | November 18 2011

Great!!! Thanks for the plugin. The Productivity Power Tools does not support C++ while yours does.

by Ehsan Mohammadi | October 08 2011

by Exanthius | June 15 2011

Doing exactly what it should do. :)

by Biktop | May 13 2011

Good! Thanks.

by sp00ks | March 26 2011

Perfect!

by DonBonx | March 09 2011

Why isn't this standard in VS ?

It's one of my favourites....

by Martin Lemburg | February 02 2011

Sorry, but it indents the braces not the right way, so it is easier to do it on my on.

by 爱让一切都对了 | November 19 2010

Good!
Could you make it also complete " and (?

by Johan Sköld | October 31 2010

Excellent plugin, does exactly what it's supposed to without bells and whistles. Only one thing bugs me, would it be possible to make it add a semicolon after the closing brace when the braces are for a class/struct/union/enum in C++?

by PHenry9999 | July 12 2010

Is there something special I need to do to "turn this on?" I start typing out an if statement with the first bracket, expecting the closing one to automagically appear, but it doesn't. I poked around Tools\Options\Brace Completion and everything is on and looks good.

The other extensions I have are hide main menu, move to region and VisualSVN.

PS Plain Text brace completion setting doesn't "stick" between VS2010 sessions. I open VS, set it, close VS, open VS again, check the setting, and it's not sticking.

UPDATE 2010-07-12: Hi Joel, thanks for getting back to me. Aaaaahhhhhh, I guess it looks like we both learned something out of this then? I guess I was just expecting to get the closing brace once I typed out the first one. Any way to put/create a setting/option for that? And no probs with the other settings page, we both got something out of this one! Thanks for the updated info. Is that "usage" info listed somewhere I just missed?

PS If you're reading this, take away two things, one, it works, and two, the author is responsive. Nice to see and thanks!

1 - 20 of 21 Items   
Sign in to start a discussion


  • auto tab on closing brace
    1 Posts | Last post May 16, 2013
    • I'm using VS 2012 with C++. Even though I turn off indent braces on the Brace completion option below the C/C++ brace completion in the options, it still auto indents the closing brace on the next line when I press enter.
      
      Is there fix available for this? Thanks for your time and efforts.
  • You could add the same support for the symbols [] and ()?
    2 Posts | Last post October 25, 2012
    • You could add the same support for the symbols [] and ()? Thank you!
    • I have made some progress towards this, but properly supporting brackets and parenthesis is a bit more difficult since they tend to be nested on the same line, which is not something the extension was originally written to handle. 
      
      The extension needs to remember all the locations of all the autocompleted closing tokens (not just the most recent as it currently does) so that if you type something like this...
      
      if (foo[1] - foo[0]) { do(something()); }
      
      ...that every time you manually type a closing token, the extension can catch that and move the cursor right one character instead of inserting a character. Since the extension only remembers one closing token at the moment, you would get something like this:
      
      if (foo[1] - foo[0]) { do(something()); })})
  • Put opening brace to the next line
    4 Posts | Last post September 27, 2012
    • It would be great if the opening brace goes down to the next line after the "enter" is clicked after typing the opening brace like how it was in VS Productivity Tools. Right now the opening brace stays in the same line. Ideally in C# like, automatically:
      
      public void Hello1()
      {
        //type here
      }
      
      Whereas now it is:
      
      public void Hello1() {
        //type here
      }
    • Nevermind, I think the Environment->Brace completion is where this was at. It has this feature.
    • it does? where?
    • I think the only setting there that would handle this is the smart formatting option for C#. For other languages, the opening brace should be left where you typed it. I might be able to change that if you tell me which language(s) you want it for.
  • Breaking VS
    2 Posts | Last post June 01, 2012
    • Hi Joel,
      
      I just updated to the latest version this morning and it has broken my VS. I am not able to type any code at all and I get a popup dialog with an extension error message.
      
      
    • Yeah. I tried to fix a crash with mouse foward/back buttons, but I ended up introducing a crash with normal keys instead. Update again (to 1.4.2) and the problem should go away.
  • Response to PHenry9999
    6 Posts | Last post April 13, 2012
    • Since you posted a question in your review and I can't comment on that directly:
      I modeled the brace completion behavior off of Netbeans which doesn't put a closing brace in immediately after you type the opening one.  Instead, it activates when you type an opening brace, then press Enter right after it.
      
      Thanks for reporting the bug with options not sticking.  It looks like I accidentally switched the order of a couple things when the options page loaded, so it initialized the options form before loading the saved settings.  The end result was the options page would always load to default settings, no matter what your saved settings were.  It should be fixed now.
    • Hi Joel, thanks for getting back to me.  Aaaaahhhhhh, I guess it looks like we both learned something out of this then?  I guess I was just expecting to get the closing brace once I typed out the first one.  Any way to put/create a setting/option for that?  And no probs with the other settings page, we both got something out of this one!  Thanks for the updated info.  Is that "usage" info listed somewhere I just missed?
    • Version 1.3 added support for getting a closing brace immediately after typing the opening one.  Please tell me if you find any unexpected behavior.
      
      As for the usage info, the first line of the description says how to use it, but I decided adding a "usage" section would make it more noticeable.
    • In VS11 Beta, the addon adds a tab on the next line if pressing 'Enter' after your initial code. This makes it appear like a malformed JS brace set.
      Example:
      
      if(true) //'Enter' pressed here
          { // a tab gets created on the new line causing a malformed JS brace-set appearance.
          //pressing 'Enter' here puts the closing brace in the proper place
      }
      
      It would be great if this little bug were fixed. So far, this is the only free addon that does brace auto-completion in VS11 Beta.
    • I should have added that it would be nice to see auto-completion for such things as parenthesis, etc., too. Just a couple of very minor things that make working with VS a whole lot better.
    • Hmm. That's not happening for me in C# on VS11. Which language are you using?
      
      Also, I'm not very familiar with VS's extensions system, so this extension is really more of a hack. It just looks for a certain input sequence, then inserts some text and repositions the cursor. I honestly have no idea how to properly do auto-completion for parenthesis, brackets, etc. Hopefully Microsoft will release a version of the Productivity Power Tools extension for VS11 (or just finally implement those as regular features so an extension isn't needed).