DEV Community

Phillip Anerine
Phillip Anerine

Posted on

Colored Brackets have been a game changer

I've worked in a few different IDEs along my path of programming, usually to the whim of different professors. However, once I started working in VSCode, I've loved it and stuck with it for its lightweight nature and customizability. I'm not sure how I didn't discover it earlier, but my friend suggested I get a color bracket extension, and it has been a game changer.

Unfortunately, I am sometimes mess with spacing when it comes to my code, Going back after a compilation error counting the amount of parentheses gets annoying with a mix of nested brackets, autocomplete brackets, and my fat finger on the shift, 8, and 9 key. Hence, colored brackets!
Image description
All this does is match the color of brackets, parentheses, etc. which makes it much easier at a glance to see what goes where. Another nice feature of it, is if there is an unmatched or extra bracket, it will let you know by coloring it a bright red that screams ERROR.
Image description
Even with this somewhat dense line of code, I'm sure you could spot it out right away. And I sure do whenever I'm coding.

This is the one I use, which I like for its bright colors, but there are other more customizable ones out there if you so please.

Are there any other extensions or conveniences you use for productivity?

Top comments (6)

tarwatuddin profile image
Tarwat Uddin

It never occurred to me that I would ever need to use an extension that highlights brackets with colours until just now when I installed the extension to see what it looks like for my current project - and I have to say - it sure does look promising!

Besides that, I use Prettier, Image preview and Auto Close/Rename Tag extensions which I consider looking into if you use Front-end stacks.

peeleebee profile image
Phillip Anerine

Glad to have helped somebody! I'll definitely have to check those out since I plan on learning React soon

moopet profile image
Ben Sinclair • Edited

There's indent rainbow

screenshot of code with different levels of indentation coloured distinctly

which I quite liked when I used VSCode, but to be honest, too many colours are a distraction for me, and the problem that coloured brackets solve is solved better by changing to a more spaced-out layout.

Edit: I have no idea why that isn't embedding correctly, it's a better image on the page I'm deeplinking it from :/

andrewbaisden profile image
Andrew Baisden

This functionality is built into Visual Studio code now.

jackmellis profile image

Yes coloured brackets are a huuuge help 🌈
One of the other biggest game changers for me was when I started using VS Code's "refactor" menu (ctrl + shift + r) regularly.

sswam profile image
Sam Watkins • Edited

I think it would be better to learn operator precedence, avoid adding superfluous parentheses, and keep expressions simple.