每隔一段时间,我就会打开Sublime Text,我的CPU会开始变得疯狂,温度会上升,而Sublime Text右下角的这个百分比会慢慢升级.我试过谷歌搜索答案但无济于事.有谁知道百分比代表什么?它是索引我的文件还是什么?如何更新此设置?
是的,百分比是索引状态.这可以从更详细的角度来看Help menu -> Indexing Status...
.此菜单项已在构建3125中添加.
有各种设置来控制索引,所有这些都必须放在用户首选项中 - 它们目前在项目设置中不起作用.相关问题:
// File indexing parses all files in the side bar, and builds an index of
// their symbols. This is required for Goto Definition to work.
"index_files": true,
// Set the number threads to use for indexing. A value of 0 will make
// Sublime Text guess based on the number of cores. Use the index_files
// setting to disable all workers.
"index_workers": 0,
// index_exclude_patterns indicate which files won't be indexed.
"index_exclude_patterns": ["*.log"],
// 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)
由于node_modules
文件夹往往很大,这可能是您的索引需要一段时间并使用大量系统资源的原因.但是,目前index_exclude_patterns
仅适用于文件名,因此如果要阻止对node_modules
文件夹建立索引,则需要将其添加到文件夹binary_file_patterns
中,尽管名称如此,也可以对文件夹进行操作.
例:
"binary_file_patterns": ["node_modules/", "*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"]
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
795 次 |
最近记录: |