How do I search for files in Visual Studio Code?

笑着哭i 提交于 2019-12-17 21:38:27

问题


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

  1. Right click VS code editor.
  2. Select Command Palete
  3. 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

  1. Open search panel
  2. Put any common words inside those files
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!