插件 HighlightWords in Sublime Text 3 如何配置?
Plugins HighlightWords in Sublime Text 3 How to configure?
您好,我已经下载了 HighlightWords 插件以将其与 Sublime Text 3 一起使用,该插件承诺使用某些颜色突出显示单词。从这里下载:
https://github.com/seanliang/HighlightWords
谁能帮我更改默认突出显示的颜色。我尝试过的事情我无法做到。这是要修改的文件:
{
// The colors to highlight texts are specified by a list of theme scope names,
// and HighlightWords uses this list in circular order.
"colors_by_scope":
[
//"keyword",
//"number",
"string",
"entity.name.class",
"variable.parameter",
"invalid.deprecated",
"invalid",
"support.function"
],
"whole_word": false,
"use_regex": false,
"ignore_case": false,
// Keywords to be always highlighted, clear the list to disable it.
// "keyword" are literally matched, and "color" refers to theme scope names.
// Note that json has some special characters like '\' should be escaped.
"permanent_highlight_keyword_color_mappings":
[
//{"keyword": "TODO", "color": "support.function"},
//{"keyword": "FIXIT", "color": "support.function"},
]
}
您可以覆盖插件用户设置中的默认插件设置。转到菜单 Preferences > PackageSettings > HighlightWords > Settings-User ,然后添加要覆盖的单词和颜色 permanent_highlight_keyword_color_mappings 属性.示例内容:
{
"permanent_highlight_keyword_color_mappings":
[
{"keyword": "Whosebug", "color": "variable.parameter"},
{"keyword": "sublime", "color": "string"},
{"keyword": "plugin", "color": "invalid.deprecated"},
]
}
保存文件,也许你需要重启sublime。结果:
您好,我已经下载了 HighlightWords 插件以将其与 Sublime Text 3 一起使用,该插件承诺使用某些颜色突出显示单词。从这里下载:
https://github.com/seanliang/HighlightWords
谁能帮我更改默认突出显示的颜色。我尝试过的事情我无法做到。这是要修改的文件:
{
// The colors to highlight texts are specified by a list of theme scope names,
// and HighlightWords uses this list in circular order.
"colors_by_scope":
[
//"keyword",
//"number",
"string",
"entity.name.class",
"variable.parameter",
"invalid.deprecated",
"invalid",
"support.function"
],
"whole_word": false,
"use_regex": false,
"ignore_case": false,
// Keywords to be always highlighted, clear the list to disable it.
// "keyword" are literally matched, and "color" refers to theme scope names.
// Note that json has some special characters like '\' should be escaped.
"permanent_highlight_keyword_color_mappings":
[
//{"keyword": "TODO", "color": "support.function"},
//{"keyword": "FIXIT", "color": "support.function"},
]
}
您可以覆盖插件用户设置中的默认插件设置。转到菜单 Preferences > PackageSettings > HighlightWords > Settings-User ,然后添加要覆盖的单词和颜色 permanent_highlight_keyword_color_mappings 属性.示例内容:
{
"permanent_highlight_keyword_color_mappings":
[
{"keyword": "Whosebug", "color": "variable.parameter"},
{"keyword": "sublime", "color": "string"},
{"keyword": "plugin", "color": "invalid.deprecated"},
]
}
保存文件,也许你需要重启sublime。结果: