Quickly Find/Open a File in Visual Studio

Here is a cool Visual Studio feature that almost nobody knows about. If you want to open up a file in your solution, but can’t be bothered to dig down through your projects and folders to find it, try this,

Click in the Find box in the toolbar,

Type >of followed by a space, then begin the name of the file you are looking for.

An auto-complete drop down will appear as you type filtering all the files in all your projects in your solution. Continue typing until the list is short enough to fine the one you want. Select it and hit enter.

The file will open in the editor.

Update: After this post made the front page of DotNetKicks, Aaron Lerch wrote a great post on his blog with more things that you can do with the find combo. One thing that is very useful is that with the >, you can issue any command, the alias >of mentioned here is just one of many. For a list of the commands, check out this MSDN page.

Another useful tip is that Ctrl+D or Ctrl+/ will automatically jump to the find box, so your hands don’t even need to leave your keyboard.

Even better is ctrl-shift-n which brings up a very cool look ahead file or class finder. I probably use this shortcut close to 100 times a day. However, I just realised this is actually (I think – will have to double check) Resharper goodness. All the more reason to use Resharper.

And, for the record, so it doesn’t look like I’m just a copycat, I had my post written a week or so ago, but just didn’t get it finished until yesterday, and of course as soon as I posted it I saw yours on dotnetkicks and said “doh!”

Post navigation

About Me

My name is Rob Prouse. I am a programmer and open source developer who is passionate about agile engineering and methodologies. I am a member of the NUnit development team and contribute to several open source projects.