Sublime Forum

Highlightwords pluging

#1

I help someone as I can change the color of the word to highlight?

github.com/seanliang/HighlightWords

0 Likes

#2

Read The Friendly Manual plox :

Edit settings file: Select "Preferences" > "Package Settings" > "HighlightWords", copy settings from default to user, and edit settings file. Available settings are:
    **"colors_by_scope": Change the highlight colors.**
   ** "permanent_highlight_keyword_color_mappings": Define always highlighted keywords with specified colors, such as "TODO" or "FIXIT".**
0 Likes

#3

I appreciate your response.

Could you give me an example of how to do?

This is the code

[code]{
// 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"},

]
}[/code]

I tried several times, but does not change the color white

0 Likes

#4

First - uncomment values in “permanent_highlight_keyword_color_mappings”. Secondly it uses scope names (like in syntax)

If you want to specify custom colour, hmm here it comes very tricky but it can be done.

  1. Open the file that has some colour you want (e.g open C++ which have green strings)
  2. Select the word that has colour you want to use
  3. Open console (ctrl+~ (tilde))
  4. Paste view.scope_name(view.sel()[0].begin()) and press enter
  5. Copy returned string as “color” to plugin preferences. There you go - color is set

[Edit:]
My example:
http://i.imgur.com/YuESZUw.png

0 Likes

#5

0 Likes

#6

What steps of my instruction (now merged to github.com/seanliang/HighlightWords also) you have done ? You still have “support.function” as color and I bet this is suppose to have white color in your color scheme.

0 Likes

#7

ok got it, thanks alot

0 Likes