Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the highlight color for matched braces in VS2010

I need to change the highlight color for the matched braces in VS2010.

I have tried the following setting but it doesn't work at all.

enter image description here

Any suggestion is welcome.

Thank you

like image 466
q0987 Avatar asked Nov 21 '11 03:11

q0987


3 Answers

From Microsoft

...There are two Fonts and Colors options for brace matching: "Brace matching (Highlight)" and "Brace matching (Rectangle)". Not all languages use both settings. Each language implements its own brace matching functionality, which can lead to inconsistencies in which options are used in which language. For example, C#, HTML, CSS, and a few others do not use the "Brace matching (Highlight)" option at all, which is why it doesn't do anything when you change it in those file types. However, "Brace matching (Rectangle)" should still work for C#, HTML, and CSS, which it sounds like is consistent with your experience. Some other languages will have the reverse behavior, i.e. "Brace matching (Rectangle)" will do nothing but "Brace matching (Highlight)" will work...

Not a good answer, but that's where VS2010 stands right now. Incidentally, when I changed "Brace Matching (Rectangle)" Background color, it works for me in C++ and C#, if I have my cursor immediately left of an open brace or immediately right of a closing brace.

Good luck.

like image 192
kmort Avatar answered Nov 15 '22 11:11

kmort


(tools) (options) under (environment) (fonts and colors)

show settings for (text editor)

under (display options) there are two brace matching entires

(Brace Matching Highlight) is the one that you want.

Change it, maybe restart vs 2010 for good luck.

like image 26
EvilTeach Avatar answered Nov 15 '22 11:11

EvilTeach


I use Visual Assist X for that task. After setting up visual assist for Visual Studio, you can change the bracer match and mismatch color under the display tab in the Visual Assist options menu.

like image 33
MrglMrgl Avatar answered Nov 15 '22 10:11

MrglMrgl