加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

sublimetext2 – 防止Sublime Text在搜索中包含.sublime-workspa

发布时间:2020-12-14 18:39:14 所属栏目:资源 来源:网络整理
导读:这是我的Preferences.sublime-settings文件: { "bold_folder_labels": true,"highlight_line": true,"ignored_packages": [ "Vintage" ],"remember_open_files": true,"folders": [ { "file_exclude_patterns": ["*.sublime-workspace"] } ]} 当我在侧边栏(
这是我的Preferences.sublime-settings文件:
{
    "bold_folder_labels": true,"highlight_line": true,"ignored_packages":
    [
        "Vintage"
    ],"remember_open_files": true,"folders":
    [
        {
         "file_exclude_patterns": ["*.sublime-workspace"]
        }
    ]
}

当我在侧边栏(cmd-shift-f)中搜索所有打开的文件和文件夹时,我仍然可以获得包含工作区文件的搜索结果,这些文件位于我打开的其中一个目录中.例如,如果我打开?/ foo并且有一个文件?/ foo / bar / hello.sublime-workspace,它将包含在搜索结果中.

如何让Sublime永远不要在我的搜索中包含.sublime-workspace文件?

解决方法

根据 here的评论,你看起来有两个可能的解决方案:

>在“在文件中查找…”的“Where:”字段中使用否定模式: – * .sublime-workspace
>在“文件夹”部分的设置文件中,添加“binary_file_patterns”:[“* .sublime-workspace”]

编辑

实际上,您可能只需要为“file_exclude_patterns”指定一个“路径”:

"folders":
[
    {
        "path": "./","file_exclude_patterns": [".sublime-workspace"]
    }
]

从http://www.sublimetext.com/docs/2/projects.html开始:

Each folder must have a path,and may optionally have a folder_exclude_patterns and file_exclude_patterns setting.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读