Sublime text 2 在具有文件扩展名的文件夹中找到 [英] Sublime text 2 find in folder with file extension
问题描述
如何在带有文件扩展名的 sublime text 2 文件夹中搜索?
How do I search in a folder in sublime text 2 with file extension?
我在哪里使用:
*.js
全局搜索所有 js 文件.
searches globally for all js files.
如果我尝试将其限制为一个文件夹:
If I try to restrict it to a folder:
/project/*.js
它什么都不匹配.
推荐答案
代替这个:
/project/*.js
试试这个:
project .js
这应该匹配路径中包含 project 并具有 .js 扩展名的文件
This should match files which have project in the path and have a .js extension
编辑:以上假设您正在尝试使用 Sublime Text 中的 Goto Anything 功能查找所有扩展名为 .js 的文件.
EDIT: The above assumes you're trying to find all the files with .js extension using the Goto Anything feature in Sublime Text.
如果您想在位于目录中的 .js 文件中进行搜索,您可以在搜索路径中添加一个包含过滤器:
In case you'd like to search within .js files located within a directory, you can add an Include Filter in the search path:
/project,*.js
这将搜索您输入的文本,将范围限制为 /project 中的文件及其扩展名为 .js 的子目录.
This will search for the text you've entered, limiting the scope to files within /project and it's sub-directories having the extension .js.
EDIT 2:对于 Sublime Text 3,请参考下面的 Simons 回答.
EDIT 2: For Sublime Text 3, refer Simons answer below.
这篇关于Sublime text 2 在具有文件扩展名的文件夹中找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!