Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight should use different colors when using multiple selections #44

Open
titoBouzout opened this issue May 17, 2013 · 13 comments
Open

Comments

@titoBouzout
Copy link
Contributor

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

@adzenith
Copy link
Member

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

@titoBouzout
Copy link
Contributor Author

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

@titoBouzout
Copy link
Contributor Author

:P

@titoBouzout
Copy link
Contributor Author

I've an inexplicable frustration..

@adzenith
Copy link
Member

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

@FichteFoll
Copy link
Member

  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.

@titoBouzout
Copy link
Contributor Author

@adzenith
Copy link
Member

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

@adzenith
Copy link
Member

['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?

@FichteFoll
Copy link
Member

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.

@bryan-lott
Copy link

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.

@adzenith
Copy link
Member

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

@facelessuser
Copy link

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 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants