问题
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?
回答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, also Ctrl+p works
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.
回答2:
On OSX, for me it's cmd ⌘ + p. cmd ⌘ + e just searches within the currently opened file.
回答3:
Also works in ubuntu with Ctrl+E
回答4:
Other answers don't mention this command is named workbench.action.quickOpen
.
You can use this to search the Keyboard Shortcuts
menu located in Preferences
.
On MacOS the default keybinding is cmd ⌘ + P
.
(Coming from Sublime Text, I always change this to cmd ⌘ + T
)
回答5:
I'm using VSCode 1.12.1
OSX press : Cmd + p回答6:
Win: CTRL+P or CTRL+E
Mac: CMD+P or CMD+E
Don't want to remember another shortcut?
Open command palette
(Windows: Ctrl+Shift+P) and hit backspace to delete ">" character and then search for files :)
回答7:
consider you have thousand of files in vs code and you want to search for a file with particular name then
- Right click VS code editor.
- Select Command Palete
- In the text box type the file name
回答8:
You can also press F1 to open the Command Palette
and then remove the >
via Backspace. Now you can search for files, too.
回答9:
If you just want to search a single file name
Just Ctrl
+P
, then type and choose your one
If you want to open all files whose name contains a particular string
- Open search panel
- Put any common words inside those files
- in 'files to include', put the search string with *, e.g. *Signaller*
回答10:
To search for specifil file types in visual studio code.
Type ctrl+p and then search for something like *.py.
Simple and easy
来源:https://stackoverflow.com/questions/30095376/how-do-i-search-for-files-in-visual-studio-code