3

In Visual C++ 6.0 (1998 vintage), there is a useful command Ctrl K / Ctrl J to cycle through paired conditional statements, jumping from one to the next:

#if 
...
#elif 
...
#endif

I can't find an equivalent keyboard command to do this in Visual Studio 2010. Anyone know if it's possible?

Note: it is used in an .rc2 file.

Pierre
  • 4,114
  • 2
  • 34
  • 39
  • 1
    possible duplicate of [Go to Matching Brace in Visual Studio?](http://stackoverflow.com/questions/1501921/go-to-matching-brace-in-visual-studio) – Mark Rushakoff Feb 24 '11 at 17:31
  • 2
    We'll I'll be darned... the Ctrl-] key does indeed jump forward from the '#if' to the '#elif' etc. I never thought to try it :o) That's exactly what I'm looking for. There's no way to go backward, only forward, although it wraps around when it reaches the #endif. Thank you. – Pierre Feb 24 '11 at 19:04

1 Answers1

3

This is a command called Edit.GoToBrace and you can change the keyboard shortcut from the Tools. See this In the Visual Studio editor is there a keyboard command to jump to the matching bracket?.

Community
  • 1
  • 1
Marius Bancila
  • 16,053
  • 9
  • 49
  • 91