【发布时间】:2017-06-22 18:14:00
【问题描述】:
我在 sublime 中经常使用 command-shift-f 函数来 grep 我的存储库。但是,总是会显示很长的、缩小的 .cache 文件,因为它们是自动生成的,所以我不想更改它们。
有没有办法阻止 sublime 搜索或隐藏那些 .cache 文件的搜索结果?
【问题讨论】:
标签: sublimetext2 sublimetext3 sublimetext
我在 sublime 中经常使用 command-shift-f 函数来 grep 我的存储库。但是,总是会显示很长的、缩小的 .cache 文件,因为它们是自动生成的,所以我不想更改它们。
有没有办法阻止 sublime 搜索或隐藏那些 .cache 文件的搜索结果?
【问题讨论】:
标签: sublimetext2 sublimetext3 sublimetext
如果您查看 Preferences 菜单 -> Settings,您会在左侧的 Default Preferences.sublime-preferences 文件中找到它:
// These files will still show up in the side bar, but won't be included in
// Goto Anything or Find in Files
"binary_file_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"],
您可以简单地将其复制到右侧的用户首选项中,然后添加 , "*.cache"before the]and.cache` 文件将不再被搜索,因为它们将被视为二进制文件而不是值得搜索。
【讨论】: