【问题标题】:indexing in Sublime Text 3Sublime Text 3 中的索引
【发布时间】:2016-01-24 14:41:30
【问题描述】:

我最近开始使用 Sublime Text 3,我遇到了一个小问题,让我很恼火 sublime text 仍然索引 node_modulesbower_components 下的文件,即使我在用户设置中排除了它们:

{
    "color_scheme": "Packages/1337 Color Scheme/1337.tmTheme",
    "ignored_packages":
    [
        "Vintage"
    ],
    "binary_file_patterns": [".idea/*", "bower_components/*", "node_modules/*"],
    "index_files": true,
    "index_exclude_patterns": [".idea/*", "bower_components/*", "node_modules/*"],
}

上述配置从Goto Anything中删除了排除的文件夹,但我仍然可以在这些文件夹Find in Folder...下的文件中找到文本,请指教。

另一个问题,如何在 sublime 文本中重置索引。

【问题讨论】:

    标签: indexing sublimetext3


    【解决方案1】:

    尝试** 而不是*(也可以匹配子目录),例如

    "binary_file_patterns": [".idea/**", "bower_components/**", "node_modules/**"],
    

    在 ST3 build 3114 中为我工作

    【讨论】:

    • 在 Sublime 的文件模式中没有 globstar operator ** 这样的东西。保存设置文件,触发刷新可能有帮助?有很多关于** 的帖子。也许真的曾经有过**?一个模式变成“dir”模式,一旦你在其中使用'/',它也会尝试匹配 dirs。然后 * 在最后是隐含的,如果你这样做 .../ .../*.../** 没有区别,这只是两个 '*'(任何或没有两次)sublimetext.com/docs/file_patterns.html
    猜你喜欢
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 2015-05-07
    • 2016-05-30
    • 1970-01-01
    • 2014-09-16
    • 2023-03-07
    • 2014-06-09
    相关资源
    最近更新 更多