有一个调用的设置index_exclude_patterns可用于从索引中排除特定的文件模式.默认值为:
// index_exclude_patterns indicate which files won't be indexed.
"index_exclude_patterns": ["*.log"],
Run Code Online (Sandbox Code Playgroud)
但是,似乎这只能指定文件模式,而不是目录模式.所以像"dist","dist*","dist/"或"dist/*"不工作.
在这种情况下,解决方法是修改binary_file_patterns设置.默认值为:
// 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"],
Run Code Online (Sandbox Code Playgroud)
二进制文件未编入索引,因此不会显示在定义列表中.
添加"dist/*"到模式列表应该可以解决问题.请注意,如果您还没有自定义设置,则应首先复制默认设置,否则图像之类的内容将不再被视为二进制.
| 归档时间: |
|
| 查看次数: |
722 次 |
| 最近记录: |