Wednesday, October 31, 2007

In my not so recent article I've described, how to write a Visual Studio macro for finding a Type in a project. As useful as writing macros can be, there is a better, built in way, to find a Type inside a solution.

The method that I'm talking about is the Class View window. Most C++ developers are probably familiar with it. Most C#/VB.NET developers probably are not since it's not very useful.

So how to use this window, to navigate to a Type, by using only keyboard? First, we need open it. To do it, use the Ctrl+K, Ctrl+V combination. This shortcut opens the Class View window and has a side effect of moving focus to a little textbox in it. Entering a Type name inside this textbox and pressing enter, causes Visual Studio to perform a search. After a while, we are presented with a list of matches. Up and down arrows work there and pressing enter brings us to the desired document. To cancel the whole action, press Esc (once or twice, depending on where the focus is).

Wednesday, October 31, 2007 9:10:21 PM (Central European Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview