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

(orignal theme compatibility patch) Do not color arithmetical operators #37

Closed
ghost opened this issue Jan 5, 2015 · 5 comments
Closed

Comments

@ghost
Copy link

ghost commented Jan 5, 2015

Solarized Dark and Light themes orginally does not color aritchmetical operators e.g. (=, +, -, ++, +=, &&, ||) for any language e.g.

python python

java java

Sublime Text 3 port follows these setting in some languages e.g. C++, Haskell but for other languages like Python or Ruby it colors these operators same as keywords. This is deviation from orginal theme and additionally it introduces noise.

I have prepared lines that has to be added to make Sublime scheme compatible with orginal one.

Add following lines to dark scheme:

<dict>
    <key>name</key>
    <string>Arithmetical, Assignment, Comparision Operators</string>
    <key>scope</key>
    <string>keyword.operator.comparison, keyword.operator.assignment, keyword.operator.arithmetic</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#839496</string>
    </dict>
</dict>

Add following lines to light scheme:

<dict>
    <key>name</key>
    <string>Arithmetical, Assignment, Comparision Operators</string>
    <key>scope</key>
    <string>keyword.operator.comparison, keyword.operator.assignment, keyword.operator.arithmetic</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#657B83</string>
    </dict>
</dict>
@braver
Copy link
Owner

braver commented Jan 5, 2015

This implementation of solarized strives for internal consistency over compliance with the "original". Your arguments make sense though and the changes make sense. If you can put it in a pull request and provide before and after screenshots, I'll happily pull in the changes.

@ghost
Copy link
Author

ghost commented Jan 5, 2015

@braver I have created pull request with elaborate explanation #38.

@ghost
Copy link
Author

ghost commented Jan 5, 2015

Thank you

@jibsen
Copy link
Contributor

jibsen commented Jan 10, 2015

Just to add a little context, I think this is another of those issues where you could debate the intent of the original Vim highlighting, or simply follow how it looks.

If you look at the relevant section of solarized.vim, you can see that operators are listed as a subgroup of statements. The groups listed in the comments come from the Vim documentation (:help group-name).

But the syntax files provided with Vim are relatively simple, and do not allow highlighting operators in the languages I checked (there are no rules for them).

Personally, I think either works fine. I can see the argument for removing unnecessary noise.

@braver
Copy link
Owner

braver commented Jan 10, 2015

Yes, you're right. We shouldn't let limitations of Vim dictate the syntax highlighting in Sublime if the latter has a much richer palette. I think I would've pulled this if it added colors to all syntaxes as well instead of removing it everywhere. As you say, either way is fine, but consistency across languages in the same editor is a nice thing to have.

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

2 participants