2015-04-19 59 views
2

你好,我已經下載插件HighlightWords使用它與崇高文本3,承諾突出使用一些顏色的單詞。從這裏下載:插件在崇高文本中突出顯示字詞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"}, 
    ] 
} 

回答

2

你可以在插件的用戶設置覆蓋默認插件設置。轉到菜單首選項>套餐配置> HighlightWords>設置 - 用戶,然後添加您想覆蓋的文字和顏色permanent_highlight_keyword_color_mappings屬性。示例內容:

{  
    "permanent_highlight_keyword_color_mappings": 
    [ 
     {"keyword": "stackoverflow", "color": "variable.parameter"}, 
     {"keyword": "sublime", "color": "string"}, 
     {"keyword": "plugin", "color": "invalid.deprecated"}, 
    ] 
} 

保存該文件,也許您需要重新啓動sublime。結果:

HihglightWords plugin working example