官方文檔 http://facelessuser.github.io/BracketHighlighter/customize/
官方文檔不知道為什么這么多玉控,如果只需要高亮下括號彤敛,只需下面兩步蒜焊。
- 首先, Package Settings->BracketHighligher->Bracket Settings添加如下配置("style"可以按照自己口味設(shè)置旅急,有underline, outline, solid, highlight這些模式)
{
// Define region highlight styles
"bracket_styles": {
// "default" and "unmatched" styles are special
// styles. If they are not defined here,
// they will be generated internally with
// internal defaults.
// "default" style defines attributes that
// will be used for any style that does not
// explicitly define that attribute. So if
// a style does not define a color, it will
// use the color from the "default" style.
"default": {
"icon": "dot",
// BH1's original default color for reference
// "color": "entity.name.class",
"color": "brackethighlighter.default",
"style": "underline"
},
// This particular style is used to highlight
// unmatched bracket pairs. It is a special
// style.
"unmatched": {
"icon": "question",
"color": "brackethighlighter.unmatched",
"style": "outline"
},
// User defined region styles
"curly": {
"icon": "curly_bracket",
"color": "brackethighlighter.curly",
"style": "highlight"
},
"round": {
"icon": "round_bracket",
"color": "brackethighlighter.round",
"style": "highlight"
},
"square": {
"icon": "square_bracket",
"color": "brackethighlighter.square",
"style": "highlight"
},
"angle": {
"icon": "angle_bracket",
"color": "brackethighlighter.angle",
"style": "highlight"
},
"tag": {
"icon": "tag",
"color": "brackethighlighter.tag",
"style": "highlight"
},
"c_define": {
"icon": "hash",
"color": "brackethighlighter.c_define",
"style": "highlight"
},
"single_quote": {
"icon": "single_quote",
"color": "brackethighlighter.quote",
"style": "highlight"
},
"double_quote": {
"icon": "double_quote",
"color": "brackethighlighter.quote",
"style": "highlight"
},
"regex": {
"icon": "regex",
"color": "brackethighlighter.quote",
"style": "underline"
}
}
}
- 修改正在使用的主題
例如我電腦上是Monokai Pro (Filter Spectrum),則新建一個文件Monokai Pro (Filter Spectrum).sublime-color-scheme
放在{Sublime配置目錄}\Packages\User下,文件內(nèi)容如下(顏色可以自定義):
{
"rules": [
{
"scope": "brackethighlighter.default",
"foreground": "#CC99CC"
},
{
"scope": "brackethighlighter.unmatched",
"foreground": "#F2777A"
},
{
"scope": "brackethighlighter.curly",
"foreground": "#CC99CC"
},
{
"scope": "brackethighlighter.round",
"foreground": "#FFCC66"
},
{
"scope": "brackethighlighter.square",
"foreground": "#6699CC"
},
{
"scope": "brackethighlighter.angle",
"foreground": "#F99157"
},
{
"scope": "brackethighlighter.tag",
"foreground": "#66CCCC"
},
{
"scope": "brackethighlighter.c_define",
"foreground": "#F99157"
},
{
"scope": "brackethighlighter.quote",
"foreground": "#99CC99"
}
]
}
然后就完成了,效果大概是這樣: