【问题标题】:Plugins HighlightWords in Sublime Text 3 How to configure?Sublime Text 3 中的插件 HighlightWords 如何配置?
【发布时间】:2015-06-26 10:34:06
【问题描述】:

您好,我已经下载了插件 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"},
   ]
}

【问题讨论】:

    标签: plugins sublimetext3 highlight


    【解决方案1】:

    您可以覆盖插件用户设置中的默认插件设置。转到菜单 Preferences > PackageSettings > HighlightWords > Settings-User ,然后添加要覆盖 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。结果:

    【讨论】:

      猜你喜欢
      • 2018-06-16
      • 2018-01-25
      • 2014-02-13
      • 1970-01-01
      • 2021-01-08
      • 2016-04-16
      • 2014-10-23
      • 2014-04-14
      • 1970-01-01
      相关资源
      最近更新 更多