69

Is there a key shortcut in Visual Studio to find & open a file inside your solution without using Resharper or any other tools?

Just Shadow
  • 10,860
  • 6
  • 57
  • 75
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247

5 Answers5

128

The accepted solution doesn't work on the newer versions.
For Visual Studio 2022, and 2019, 2017 do the following:

Update 1:
Now, pressing Ctrl + Shift + T and typing the file name works!

Update 2:
Since Visual Studio 2019 now it's possible to do a similar search via Ctrl + Q.
But it works slightly sloppy since it shows VS-related stuff as well.

Original answer:

  1. Press these keys to open the "Go to" popup:
    Ctrl + ,
  2. Type there:
    f Space Filename
  3. Press Enter

enter image description here

Notes:

  • We are writing f to make VS search only on files. We can also, use other letters. For more info type ? in the "Go to" popup.
  • For more keys and for Visual Studio 2012 to 2015 take a look at this answer.
Just Shadow
  • 10,860
  • 6
  • 57
  • 75
  • 16
    Microsoft employees should spend a while working with a Jetbrains IDE such as IntelliJ IDEA to find out how IDEs should really work! – Will Calderwood Sep 11 '17 at 20:14
  • I've been using 2017 forever now and had no idea this functionality was in there. Awesome!!! The only question I have is is it possible to make that a floating/dockable window. I personally hate that 'shove it up in the corner' thing they have going on. It's *REALLY* annoying on large screens with multiple panes because it show up in so many different places! – Mark A. Donohoe Aug 14 '18 at 15:47
  • 2
    Sadly there is no such floating functionality at this moment, but it's possible to make the bar appear in the center instead of corner. To do so, open the settings of that panel (Ctrl+, then Alt+Shift+G) and check "Center Window" – Just Shadow Aug 14 '18 at 18:32
  • Ctrl + shift + t then type filename and enter or select – Pravin Shinde Mar 22 '22 at 05:59
  • @MarkA.Donohoe, good news. Now in the preview version of the Visual Studio 2022 (v17.3 Preview 1.1) that window is floating. You can either download the preview version or wait a bit till they release – Just Shadow Jun 06 '22 at 08:30
  • @WillCalderwood I have used Visual Studio for years before switching to a JetBrains IDE. I still think Visual Studio is the best IDE I've used, but IntelliJ is a very close second. Although I will admit I stumbled on this question trying to find the equivalent of "double shift -> find all" when having to go back to Visual Studio. – Chuu Aug 31 '23 at 21:29
14

This answer is outdated; see here for latest information.


Not a single keystroke, but yes: `Ctrl+D > o f filename` (so that's five keystrokes before you start typing the filename). It then autocompletes the filename for you.

You need the Find box in the toolbar for this to work.

(If you change your mind about addins, SonicFileFinder is for this very purpose, and free.)

Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
RichieHindle
  • 272,464
  • 47
  • 358
  • 399
  • 1
    This is what i'm looking for. However, when I try to open a file VS, its telling me that "The operation could not be completed. The system cannot find the file specified." This doesn't make sense since VS was giving me this file in intellisence. Also I found this: http://geekswithblogs.net/hongyes/archive/2009/03/23/visual-studio-tip-navigate-to-file-by-typing-file-name.aspx Thanks – dev.e.loper Jun 16 '09 at 19:42
  • I don't know why you're getting that error, I'm afraid. It's always worked perfectly for me. Sorry... – RichieHindle Jun 16 '09 at 19:49
  • Visual Assist X has a pretty nifty Alt+Shift+O that does essentially the same thing, and it shows you a dialog of all files that match the current substring you've typed in so far while you type. – Adam Rosenfield Jun 16 '09 at 20:19
  • 1
    This answer is deprecated. Check this for newer versions of Visual Studio https://stackoverflow.com/questions/1003445/key-shortcut-in-visual-studio-to-open-a-file-inside-your-solution/44164379#44164379 – Just Shadow May 24 '17 at 16:56
10

You can also use Ctrl + /, which puts the > in place for you automatically.

Jasper
  • 2,166
  • 4
  • 30
  • 50
mellamokb
  • 56,094
  • 12
  • 110
  • 136
  • 1
    If you do not have the "Go To Find Combo Box" on your toolbar, this will not work. To add it, click on drop down at the end of the Standard Toolbar > Add > Find (listed after Find in Files). – anishpatel Jun 15 '16 at 22:59
  • Official documentation for the Find/Command Box https://msdn.microsoft.com/en-us/library/1665hyw1.aspx – anishpatel Jun 16 '16 at 22:52
8

Similar to Just Shadow's answer I discover that, on Visual Studio 2017, you can do the following:

Press Ctrl + 1, then f

Or you could go to Tools -> Options -> Keyboard and change the shortcut of Edit.GoToFile for whatever you like.


I replaced mine with: Ctrl + O

D.Kastier
  • 2,640
  • 3
  • 25
  • 40
  • 1
    Well, "[Ctrl] + [,] then [f]" is not only similar to @JustShadow's answer, but also is the same solution provided by him :) – Just Shadow Mar 27 '18 at 18:27
  • 1
    Sorry, that was a ``copy`` ``paste``problem. Thanks for pointing out! – D.Kastier Mar 27 '18 at 20:21
  • 2
    damned, I have been searching for this "Edit.GoToFile" forever, I always searched for "GoTo" and I never got the result. big thanks – Tower Jimmy Dec 25 '22 at 11:42
0

Options => Projects and Solutions => Track Active Item in Solution Explorer