nikeee / visual-studio-dark

Dark Visual Studio color scheme for Sublime Text
55 stars 16 forks source link

Python arithmetical operators must not be higlighted + patch #2

Closed ghost closed 9 years ago

ghost commented 9 years ago

In this theme arithmetical operators (=,+, etc) are higlighted in Python code while they are not higlighted in C++. Visual Studio does not highlight operators so I have done modification to fix situation for Python. Unfortunately I can not attach any file so I appended code to the end of message. Please incorporate the fix.

This code should be added to file starting from line 67

<dict>
    <key>name</key>
    <string>Comparision Operator</string>
    <key>scope</key>
    <string>keyword.operator.comparison</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#FFFFFF</string>
    </dict>
</dict>
<dict>
    <key>name</key>
    <string>Assignment Operator</string>
    <key>scope</key>
    <string>keyword.operator.assignment</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#FFFFFF</string>
    </dict>
</dict>
<dict>
    <key>name</key>
    <string>Arithmetic Operator</string>
    <key>scope</key>
    <string>keyword.operator.arithmetic</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#FFFFFF</string>
    </dict>
</dict>
nikeee commented 9 years ago

Can you provide a sample python code for me just to see the difference? I just created another branch called issue-2. If it's fine I'm going to merge it into the main branch.

ghost commented 9 years ago

Please compare this Python code

a = a + b/c
if a == b:
    a += b

if a <= b:
    a = b % 2

With analogous C++ code:

int main() {
    a = a + b/c
    if (a == b)
        a += b

    if (a <= b)
        a = b % 2
}

in Sublime Text 3.

nikeee commented 9 years ago

Just tested this on my secondary machine and I can see the difference. I'll merge your patch. Thanks!

nikeee commented 9 years ago

@Trismegistos84 Try to upgrade your package. Is the problem fixed now?

ghost commented 9 years ago

Much better! Thank you.