WordHighlight icon indicating copy to clipboard operation
WordHighlight copied to clipboard

Highlight should use different colors when using multiple selections

Open titoBouzout opened this issue 11 years ago • 13 comments

It would be very nice, to use different colours when using this package with multiples words. I'll try to take a look

titoBouzout avatar May 17 '13 09:05 titoBouzout

The only annoying thing is that all colors have to come from the color scheme, so this could be difficult.

adzenith avatar May 17 '13 17:05 adzenith

The only difficult thing in life is to get jon to reply to messages/forums post, bugs, programming things can be solved.

titoBouzout avatar May 17 '13 17:05 titoBouzout

:P

titoBouzout avatar May 17 '13 17:05 titoBouzout

I've an inexplicable frustration..

titoBouzout avatar May 17 '13 17:05 titoBouzout

Haha I find it easily explicable... I've the same one :)

adzenith avatar May 17 '13 17:05 adzenith

  1. A list with all the default scopes (like constant, string ...) and wrapping it should be sufficient.
  2. Yes, some words about potential future features woule be really nice. Even a word of decline is better than nothing.

FichteFoll avatar May 17 '13 20:05 FichteFoll

Relevant: http://www.sublimetext.com/forum/viewtopic.php?f=2&t=12418

titoBouzout avatar May 17 '13 20:05 titoBouzout

There's a list of the 11 "root groups" here: http://manual.macromates.com/en/language_grammars

adzenith avatar Dec 30 '13 22:12 adzenith

['comment', 'constant', 'entity', 'invalid', 'keyword', 'markup', 'meta', 'storage', 'string', 'support', 'variable'], but maybe we wouldn't want to use "invalid".

Do people still use this plugin?

adzenith avatar Dec 30 '13 22:12 adzenith

Excluding meta, because that's actually not supposed to be colored but more of an internal thing, so we have 10 available colors. (I use it a lot for AAAPackageDev auto completion because I can use the regex parsing of the file from the syntax definition instead of parsing stuff yet again.) Also, some color schemes only define invalid.deprecated and invalid.illegal but not illegal itself.

I don't think I ever used this plugin, but the issues are quite active I guess.

FichteFoll avatar Dec 30 '13 22:12 FichteFoll

You could do highlighting similar to Colorcoder and hash the word underneath the cursor to determine its color. And, to retain the current functionality, only do it if there are multiple selections.

bryan-lott avatar Mar 31 '15 15:03 bryan-lott

ColorCoder modifies the color scheme file to add other colors. I guess we could do the same? ...Could you just use ColorCoder? :stuck_out_tongue:

adzenith avatar Mar 31 '15 16:03 adzenith

I've never used this plugin, but I was looking through the groups issues today and saw this. I personally use a custom word highlighter that I picked up on the forums a long time ago and heavily modified it. I've never released it, but it supports multi selections. I keep it in my bin of plugins I don't care to publicly support https://github.com/facelessuser/SublimeRandomCrap/blob/master/highlight_word.py.

I personally wanted to easily be able to specify multi-selections so at any time I could have as many or few as I wanted. So I made it dynamic in the settings:

    // Define scopes for highlights
    // The more you define, the more selections you can do
    "highlight_scopes": ["string", "keyword", "constant.language"],

Anyways, maybe this will spark some ideas. I have no objections of anyone snagging code or ideas from it, but I was not the original author and I don't think there was ever a license associated with it...so whatever that means. Just figured I'd throw something at this as it's been open for years :smile:.

facelessuser avatar Jul 24 '15 07:07 facelessuser