Monday, April 25, 2011

Matching parentheses in Visual Studios 2005

When doing developement for linux, I have a file for vim that changes the colors of matching parentheses.

So for example, given the following line:

if( (foo / 12 == 4) && arr[i] == 2 ) {}
The parentheses that opened and closed the if statement could be red, the parentheses that hold the foo statement could be blue, the brackets that hold the array index could be green, and the curly-brackets would be light-brown.

Such a tool makes complex control-statements much easier to understand, and the days of manually looking to see what matched what are over.

Is there an option in VS 2005 for this sort of functionality? I'm not in a position to pay for any tools that offer such a thing, so I'd appreciate it if there's a built-in option or a free plugin.

From stackoverflow
  • I don't know of something that exactly does that, but I'll draw your attention to the functionality that is built in. When you type a character that can match (such as a close-paren), it will briefly highlight the matching character. The key combination ctrl-] will take you between matching characters.

    Will Mc : I've noticed the brief highlighting. It can be useful, but it seems too short for my tastes, not apparent enough, and it'd be nice for it to show up whenever I have the cursor at a parentheses / bracket. I have been wondering about the ctrl-] trick though. Thanks!

0 comments:

Post a Comment