Key shortcut (hotkey) in Visual Studio to open a file inside your solution?

Visual StudioKeyboard Shortcuts

Visual Studio Problem Overview


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

Visual Studio Solutions


Solution 1 - Visual Studio

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.

Solution 2 - Visual Studio

This answer is outdated; see here for latest information.


Not a single keystroke, but yes: Ctrl+D > o f <space> 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.)

Solution 3 - Visual Studio

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

Solution 4 - Visual Studio

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

Solution 5 - Visual Studio

Open the Command Palette: Click - View > Command Palette Type "File: Open File"

VS Code will show you the hotkeys that are currently set when you do this. For me it's Ctrl + O

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiondev.e.loperView Question on Stackoverflow
Solution 1 - Visual StudioJust ShadowView Answer on Stackoverflow
Solution 2 - Visual StudioRichieHindleView Answer on Stackoverflow
Solution 3 - Visual StudiomellamokbView Answer on Stackoverflow
Solution 4 - Visual StudioD.KastierView Answer on Stackoverflow
Solution 5 - Visual StudioBrent SandstromView Answer on Stackoverflow