Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the color for bracket highlighting in Visual Studio 2017?

I'm trying to configure brackets highlighting in Visual Studio 2017 (version 15.6.6, using the "Light" theme), but I can't get it to work, and I don't understand whether I am doing it wrong or the feature is buggy.

I'd simply like Visual Studio to make matching brackets turn red, instead of the default setting of having a grey background.

By going to Tools -> Options -> Environment -> Fonts and Colors, I find three settings:

  • Brace Matching
  • Brace Matching (Highlight)
  • Brace Matching (Rectangle)

Apparently, the first two do... Nothing. I've tried setting the foreground and background to different colors, but I see no change, even after a restart. The only setting that does something is the third one, where I can change the color of the background rectangle as expected. But that isn't what I want.

Why don't the first two settings do anything? Is it a bug? How can I make matching brackets become red?

I've found other questions about Visual Studio 2013 and Visual Studio 2015. They don't help, and the latter turned out to be a bug. Is this another one?

like image 477
Fabio says Reinstate Monica Avatar asked Apr 23 '18 00:04

Fabio says Reinstate Monica


1 Answers

Somehow, off topic. I would warmly recommend you to make use of the (free) Viasfora extension for Visual Studio.

It comes with plenty of goodies that will make you forget the need to click the bracket to get its match.

Example: It colors the brackets with a different color for each statement.

enter image description here

From Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=TomasRestrepo.Viasfora#overview

like image 142
George Avatar answered Sep 28 '22 10:09

George