views:

1817

answers:

4

Is there a way in Visual Studio 2008 to go from a closing brace to it's opening brace? I've found a fair amount of stuff about highlighting the brace, but nothing about moving the cursor to it.

+15  A: 

Use CTRL + ] to switch between them. Place the cursor at one of the braces when using it.

Ahmad Mageed
+23  A: 

I found this for you: Jump between braces in Visual Studio

Put your cursor before or after the brace (your choice) and then press Ctrl+]. It works with either curly or round braces. From now on you don’t need to play Where’s Waldo? to find that brace.

Tim Santeford
Note that this shortcut might be different on non-English keyboards. on my German one I have to press two keys to enter a `]` character (`AltGr`+`9`). To jump at matching braces/parentheses/square brackets (unfortunately for C++ programmers, they forgot angle brackets), I need to press `Ctrl`+` ` `, even though I use the English version of VS. Anyway, you can find out about this (or change it) under Tools/Options/Environment/Keyboard. The command is names "Edit.GotoBrace".
sbi
A: 

on my Danish keyboard its CTRL+Å

Raymond
A: 

In my Portuguse keyboard and SO with EN VS it's CTRL + « to navigate to matching brace and CTRL + SHIFT + « if you pretend to select the inner code.

Rodrigo