Quick Search has to be one of my favorite features in the 2010 CTP. I find myself using it all the time! I hope you will find it useful in your development too. The Quick Search functionality has become a pretty common feature in development environments today. That’s because it since it handles such a common scenario – needing to find something in your code! Read on to learn more about this exciting addition in VS 2010.
This blog post is part of a series on the walkthroughs included in the October VS2010 CTP. Each walkthrough guides you through a series of steps, to help you experience the new features coming up in Visual Studio 2010 and .NET Framework 4.0. Even if you choose not to download the CTP, you may find that you are still able to give feedback based on the descriptions and illustrations below. Please leave your feedback on this feature set at the end of this post, or at the following forum:
Walkthrough: Quick Search for Files and Symbols
This walkthrough demonstrates the new Quick Search for Files and Symbols feature in Visual Studio 2010. Quick Search is a tool that helps you locate items in your code by using "fuzzy" search capabilities. You can access the Quick Search window from within any code file in a project by pressing CTRL+, (the CTRL key and the comma key). You can type any number of search terms in the Quick Search window and Visual Studio will search your project for symbols, which include file, type, and member names, that match the supplied search terms.
For convenience, this walkthrough uses the PeopleTrax sample that is included with Visual Studio. You can, of course, use the Quick Search feature with any solution or project.
To open the sample solution
- Navigate to C:\Program Files\Visual Studio 10.0\Samples\1033\TeamDev Samples.zip.
- Extract the files to a folder of your choice, and then navigate to the PeopleTrax folder.
- Double-click the PeopleTrax.sln to open the solution in Visual Studio 2010.
To search for symbols by using the Quick Search window
- Open any file. Click inside the code editor and press CTRL+,. The following window appears.
- In the text box at the top of the Quick Search window, type get. The Quick Search window displays all symbols that contain the characters "get", as shown in the following illustration. The search is case-insensitive.
- After "get", type a space and then name. The Quick Search window displays all symbols that contain both "get" and "name", as shown in the following illustration.
- Press the DOWN ARROW key to select the GetNames entry in the results box. Press ENTER. Visual Studio will navigate to the GetNames method definition, in the file where it is defined.