23

In Notepad++ for example when your cursor is next to a brace it will highlight the corresponding opening or closing brace on screen.

Check out the link below for a example as to what I mean. http://www.atmel.com/webdoc/visualassist/visualassist._match.html

How can Visual Studio do this?

1 Answer 1

39

The Visual Studio 2013 C# editor has brace highlighting. Place the cursor on the outside of the brace, (not the inside) to see the highlight.

Default Brace color

The default color is very subtle, use the Tools\Options\Fonts And Colors setting to apply a different highlight color.

Fonts and Colors setting

New Brace Color

9
  • 1
    Is there a way to have this work on xml files and other files? Not just C# ones?
    – Pie
    Jul 20, 2015 at 2:50
  • What to you want to match in the XML file? The elements? Jul 20, 2015 at 7:21
  • 6
    In Visual Studio 2015, I had to change the Brace Matching display item rather than Brace Matching (Rectangle), to notice the color. Feb 9, 2017 at 21:46
  • 4
    In Visual Studio 2017, have to change the Brace Matching instead of the Brace Matching (Rectangle). Thanks to Walt, that is very helpful especially I change the background to grey. So if the background for brace matching is also grey, the brace could not stand out. Jun 23, 2017 at 1:55
  • 3
    @Zack You can move to the other brace with Ctrl+] Dec 1, 2017 at 7:27

Your Answer

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.