我习惯了Resharper,在那里我可以搜索文件,不是内容,而是文件名,这使得它可以快速打开新文件。
这个功能在Visual Studio Code中实现了吗?有快捷方式吗?
我习惯了Resharper,在那里我可以搜索文件,不是内容,而是文件名,这使得它可以快速打开新文件。
这个功能在Visual Studio Code中实现了吗?有快捷方式吗?
当前回答
我使用的是VSCode 1.12.1
OSX press :Cmd
+p
其他回答
对于windows。 如果Ctrl+p并不总是有效 使用Ctrl+shift+n代替。
获胜:CTRL+P或CTRL+E
Mac: CMD+P或CMD+E
不想记住另一条捷径?
打开命令面板:
菜单:View ->命令面板 Windows快捷键:Ctrl+Shift+P
然后按退格键删除“>”字符,然后开始输入通过文件名搜索文件。:)
也适用于ubuntu与Ctrl+E
在VSCode 1.75(2023年1月)中,你将有一个新的文件过滤器选项:“模糊匹配”切换。
来自问题116286:树:支持连续查找
In a list of files I can filter them by start typing the name of the file. It is a super useful feature when you have hundreds+ files. My issue is that the filter is trying to find the letters in the whole file name. Here is an example search for word "file": this-is-**file**-i-looked-for.jpeg (I expect this to be returned) **f**or-th**i**s-**l**.jp**e**g (This should not be returned, it is only a random match) Would it be possible to add there extra settings to only returns full strings matches? Or is there some setting already buried somewhere?
解决方案:在树查找小部件中添加一个“模糊匹配”切换按钮。
新选项:
defaultFindMatchTypeSettingKey。fuzzy:搜索时使用模糊匹配。 defaultFindMatchTypeSettingKey。在搜索时使用连续匹配。
自2022年7月发布1.70.0版本以来,您可以在查找资源管理器等树视图中查找和过滤。您可以在树中按Ctrl+F弹出Find控件。
在1.70.0版本之前
当你点击资源管理器树中的任意位置,并开始在键盘上输入内容时,搜索关键字会出现在屏幕的右上角:("module.ts")
当你用鼠标光标悬停在关键字上时,你可以点击“启用过滤类型”来过滤你的搜索树!