Make use of colored braces in Visual Studio

- 1 minute read

I have always been a fan of extensions that make my life easier. One of those extensions was the Rainbow braces extension by Mads Kristensen. This extension colors the braces in your code. This makes it easier to see where a block starts and ends. Especially when you have a lot of nested blocks like when writing Linq queries.

It seems many people liked the extension so Microsoft decided a while ago to integrate it into Visual Studio. The only thing you need to do is enable it.

You can either enable it by going to Tools > Options > Environment > Text Editor and then select Enable brace pair colorization. Another way to get to it is by using the keyboard combination ctrl + q and then type brace pair colorization. It will land you on the same option:

Enable brace pair colorization

Of course you want to see some results so here is a screenshot of the same code with and without brace pair colorization:

Without brace pair colorization:

without brace pair colorization

With brace pair colorization:

with brace pair colorization

Personally I like the colored braces. It makes it easier to see where a block starts and ends.

Leave a Comment