Visual Studio trick to quickly find any file in solution

Andrew Arnott

You know that Find text box in the toolbar of Visual Studio?  Those of us who are keyboard-inclined probably never use it because Ctrl+F is quicker than moving your hand to the mouse.  But there is a hidden gem of a feature inside it that really makes me feel like a power user that I wanted to share.

That find box doubles as a Command Window prompt if you just start with a ‘>’ sign.  The feature in this that I use the most is this:

image

First jump up to that box using the keystroke Ctrl+/.  Now type ">of " and follow with the start of a filename.  As fast as you can type, Visual Studio searches your entire solution for a file or path that starts with the characters you type and you can quickly select that file (with the keyboard using the arrow keys if you wish) and open it.  If you’re working in a solution with several projects or folders, this can be a significant time saver.

For those of you unfamiliar with the Command Window, you can think of it like an Immediate Window that you use with the debugger, except that instead of controlling the debuggee, you’re controlling Visual Studio.  It’s like the VS macro editor, except that everything you type takes immediate effect.  To have this conveniently just a Ctrl+/, > keystroke away, especially when ">of " (short for Open File) is such a convenient acronym to search across your entire solution is awesome.

0 comments

Discussion is closed.

Feedback usabilla icon