Click here to Skip to main content
Click here to Skip to main content

Tips & Tricks: Incremental Search in Visual Studio 2010

By , 7 May 2010
 
You all know that Visual Studio 2010 is now available in its RTM version. There are lots of features available in Visual Studio 2010. In this tip, I will talk about the incremental search functionality available inside it, which is very useful in day to day life of coding.
 
So, what is the incremental search? Incremental search is a mechanism in Visual Studio 2010 by which you can search and focus on the searched keyword without any UI blocking from the user end. You don’t have to open the find dialog while searching for a specific keyword in your editor window.
 
Interested to know how it works? Let us open our Visual Studio 2010 IDE and open a sample application. Lets say in your application you have several "Customer" words and you want to find those.
 
First go with the old way by opening the Find pane to search. Press Ctrl + F. This will open up the Find dialog pane. Enter your search keyword to search. Thus you can find your word but as this opens the find pane, the editor window blocks by some UI. Have a look into the below figure:
 

 

Now let us go with the new way of finding keyword using the incremental search. Press Ctrl + I in your editor window. This will change your cursor to a find cursor. Now, once you start typing you will see that it actually starts finding the typed character just like the following figure:
 

 

Press Ctrl + I again to go to the next result. If you press Ctrl + Shift +I, this will search in the backward direction.
 

 

In this entire search you will notice that, it doesn't open up any extra UI in the screen, thus not blocking the editor window, which is really helpful while searching for some specific word.
 
Shortcuts for Incremental Search:
 
- (Ctrl + I) => Starts & moves the incremental search forward direction
- (Ctrl + Shift + I) => Starts & moves the incremental search backward direction
- (ESC) => Stops the incremental search

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

_ Kunal Chowdhury _
Software Developer
India India
Member
Kunal Chowdhury is a Microsoft MVP (Most Valuable Professional) in Silverlight Technology, a Codeproject MVP & Mentor, DZone MVB (Most Valuable Blogger), Speaker in various Microsoft events, Author, passionate Blogger and a Software Engineer by profession.
 
He is currently working as a Software Engineer II in an MNC located at Pune, India. He has a very good skill over XAML, C#, Silverlight and WPF. He has a good working experience in Windows 7 application (including Multi-touch) development too.
 
He posts his findings in his technical blog. He also writes for SilverlightShow and Codeproject portal. Many of his articles were highlighted as "Article of the Day" in Microsoft sites.
 
He also has another website called Silverlight-Zone.com where he posts article links on Silverlight, Windows Phone 7 and XNA accumulated from various web sites to help the community grow on specified technologies.
 
You can reach him in his Blog : http://www.kunal-chowdhury.com
He is also available in Twitter : http://twitter.com/kunal2383

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionnicememberCIDev24 Apr '12 - 4:21 
A well written and well illustrated tip. I like the incremental search and have been using it in VS2008 for some time. Smile | :)
Just because the code works, it doesn't mean that it is good code.

GeneralVS2008 has done that for years...mvpLuc Pattyn20 Aug '11 - 23:57 
VS2008 has done that for years...
QuestionOld news...memberAxel Rietschin3 Jan '12 - 5:35 
Nice tip, but incremental search was introduced (at least to me) by the Brief editor from UnderWare Inc in the 1980 and has been available in Visual Studio for years. It is certainly not a feature new to VS1020. There is a great (great) chance that a large part of the Windows OS and the original Visual Studio itself were written using Brief!

AnswerRe: Old news...mvp_ Kunal Chowdhury _3 Jan '12 - 6:52 
Hi Axel, for your information, it is a new feature in Visual Studio 2010. In earlier versions it was not present.
Regards - Kunal Chowdhury
Microsoft MVP (Silverlight) | Codeproject MVP & Mentor | Telerik MVP

 
Follow me on: My Technical Blog | Silverlight-Zone | Twitter | Facebook | Google+

GeneralNice Trick!memberinetfly12312 May '10 - 2:41 
I like it this trick. Nice article layout with the angled images too. Thanks!
 
Ryan

GeneralRe: Nice Trick!mentorKunalChowdhury12 May '10 - 7:04 
Hi Ryan,
 
Thanks for your feedback. I am happy that, you liked this trick also the view of the layout. Smile | :)
Also, read my other tricks & articles and give your feedbacks.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 8 May 2010
Article Copyright 2010 by _ Kunal Chowdhury _
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid