How do I search for files in Visual Studio Code?

I am used to Resharper where I can search for files, not the content, but the filename, which makes it quick to open new files.

Is this feature implemented in Visual Studio Code and is there a shortcut for it?


Solution 1:

Using Go to File... which is under the Go menu or using keyboard shortcut:

  • On Windows Ctrl+p or Ctrl+e
  • On macOS Cmd ⌘+p
  • On Linux Ctrl+p or Ctrl+e

Then type the file name.

Also be sure to checkout that you can set your own keybindings and that there are cheatsheets available for Windows, macOS and Linux.

Solution 2:

On OSX, for me it's cmd ⌘ + p. cmd ⌘ + e just searches within the currently opened file.

Solution 3:

If you want to see your files in Explorer tree...

when you click anywhere in the explorer tree and start typing something on the keyboard, the search keyword appears in the top right corner of the screen : ("module.ts")

enter image description here

And when you hover over the keyword with the mouse cursor, you can click on "Enable Filter on Type" to filter tree with your search !

Solution 4:

Win: CTRL+P or CTRL+E

Mac: CMD+P or CMD+E


Don't want to remember another shortcut?

Open the Command Palette:

  • Menu: View -> Command Palette
  • Windows Shortcut: Ctrl+Shift+P

and hit backspace to delete ">" character and then begin typing to search for files via filename. :)