本文翻译自: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. 我习惯于Resharper,在这里我可以搜索文件,而不是内容,而可以搜索文件名,这可以快速打开新文件。
Is this feature implemented in Visual Studio Code and is there a shortcut for it? 此功能是否已在Visual Studio Code中实现,并且有快捷方式吗?
#1楼
参考:https://stackoom.com/question/22HBI/如何在Visual-Studio-Code中搜索文件
#2楼
Using Go to File... which is under the Go menu or using keyboard shortcut: 使用转到菜单下的转到 文件...或使用键盘快捷键:
- On Windows Ctrl + p or Ctrl + e 在Windows上, 按Ctrl + p或Ctrl + e
- On macOS Cmd + p 在macOS Cmd + p上
- On Linux, also Ctrl + p works 在Linux上, Ctrl + p也可以
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 . 另外,请确保签出您可以设置自己的键绑定,以及适用于Windows , macOS和Linux的 备忘单 。
#3楼
On OSX, for me it's cmd ⌘ + p . 在OSX上,对我来说是cmd⌘ + p 。 cmd ⌘ + e just searches within the currently opened file. cmd⌘ + e仅在当前打开的文件中搜索。
#4楼
I'm using VSCode 1.12.1 我正在使用VSCode 1.12.1
OSX press : Cmd + p OSX按: Cmd + p#5楼
也可以在Ctrl + E的ubuntu中使用
#6楼
Win: CTRL + P or CTRL + E 赢: CTRL + P或CTRL + E
Mac: CMD + P or CMD + E Mac: CMD + P或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 :) 打开command palette
(Windows: Ctrl + Shift + P ),然后按退格键删除“>”字符,然后搜索文件:)