Ziff Davis EnterpriseDevLife
Advertisement
Advertisement

Friday, February 27, 2009 8:39 AM/EST

Visual Studio Challenge: Learn a new Menu command

Something that's been on my mind lately is the fact that there is so much inside of Visual Studio that I have never tapped. Last year, I started using the menu options that reformat code so it is easier to read. And if you know me, you know I blogged about that.
One of my favorite, unsung features in Visual Studio

Not only was the existence of this capability new to me, but I even memorized the keystroke for the feature (though I forgot the keystroke after not using it for a while.)

There are plenty of more gems like that in Visual Studio. THere are some wonderful books out there that will help you uncover things like this such as Deborah Kurata's Best Kept Secret's in .NET (with .NET and Visual Studio treasures) and Sara Ford's Microsoft Visual Studio Tips.

But there's also something you can do on your own, which I think is fun to challenge yourself with. Start exploring the menu and look for items that you have never used before. I'm sure there are still a few! Then click on it and see what it's for. If it's not obvious then go read about it in the documentation and finally try it out.

I did just that this morning, and very quickly discovered the Find Results option under the View menu.
finda.png

I had never used it before and didn't know what it was for. Clicking on the Find Results 1 sub-menu item opened up an empty window at the bottom of the screen. I then did a CTRL-F Find to see if the results of a search for some text in my code would display something in the window. Nope. So I cracked open MSDN and looked up Find Results. And boy did I learn some new things there.

Find Results displays the results of a "Find in Files" search. I had never heard of a Find in Files search. After some more exploration, I realized that I have always use the default Quick Find feature of the Find & Replace window. findb.png

Doing a search against Find in File

findc.png

will display the results in the Find Results window. THis is much better than Find Next, Find Next, Find Next and then ending up with a whole bunch of open windows.

So, now it's your turn. What new menu option can you discover today?

TrackBack

TrackBack

http://blogs.devsource.com/cgi-bin/mte/mt-tb.cgi/16553

Comments (4)

RobH :

Another cool thing about that feature is once you've got the find results showing you can double click on a result to be brought right to it. Once you've done that you can hit F8 to cycle over the found results and be automatically brought to each match.

Julie :

Cool, Rob. The display in the Results windows doesn't make that obvious. But thanks to your comment, I tried clicking on the results. Sweet!

Carl :

Another couple of useful things in this area:

I often want to keep the results window available while searching for some other results. That is where the "Results 1 Window" and "Results 2 Window" radio buttons come in. By default, your results go to window 1. By changing to window 2 before your search, you can keep the first set of results in window 1 and switch back and forth between results.

Also, you can search inside the results themselves! By clicking anywhere in the results window and then selecting "Quick Find" with "Current Window" selected as the "Look in" choice, your search will be in the search results window itself.

When I discovered this about 2 years ago, I fell in love (well, as much as a geek would fall in love with a feature, anyway). This takes a LOT of the fear out of global find/replace operations, since you get all the search results in a nice, tidy list. It especially helps in cleaning up code, especially CSS. If I am not sure that a style is being used any more (I work on a fairly large social networking site), performing a Find in Files makes it so much easier to determine whether or not a particular style is in use any more.

A great shortcut for you... CTRL-SHIFT-F will bring up the Find in Files dialog box for you. Makes for VERY snappy searching.

Post a Comment

 
 

Advertisement

Syndication

Subscribe: