在 Sublime Text 2 中限制文件搜索范围 [英] Limit File Search Scope in Sublime Text 2

查看:52
本文介绍了在 Sublime Text 2 中限制文件搜索范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Sublime Text 中,我经常使用 Cmd+P/Ctrl+P 来搜索和跳转文件.

In Sublime Text, I often use Cmd+P/Ctrl+P to search and jump between files.

通常,它会选择临时文件或缓存文件,例如 .scssc 或/tmp 文件夹中的内容.

Often, it would pick up temporary or cached files like .scssc or things in the /tmp folder.

有没有办法限制搜索结果中显示的内容?

Is there a way that I can limit what is shown in the search result?

推荐答案

在你的 ~/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings 中添加和编辑它文件.

Add and edit this in your ~/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings file.

// 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"],

"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS"],

这篇关于在 Sublime Text 2 中限制文件搜索范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆