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

Diff syntax highlighting doesn't work #169

Closed
mourner opened this Issue Jul 18, 2012 · 6 comments

Comments

Projects
None yet
6 participants
@mourner
Copy link

mourner commented Jul 18, 2012

Hi, using Sublime Text 2.0.1 and latest version of your plugin, for some reason diff syntax highlighting isn't working. :( When running diff, it says in the status bar:

Info: Invalid language: Diff. Available: JavaScript, ..., Line 13, Column 1

Checked Sublime Packages for Diff folder - it's there. What may be the problem?

@mourner

This comment has been minimized.

Copy link

mourner commented Jul 18, 2012

Sorry, figured out that Eiffel default color scheme doesn't have diff colors set up.

@mourner mourner closed this Jul 18, 2012

@MaciekBaron

This comment has been minimized.

Copy link

MaciekBaron commented Oct 15, 2012

Hi, I'm having the same problem alas with every colour scheme - what needs to be done to fix it? Do I need to manually add colours for Diff? If so - how?

@misterjoonas

This comment has been minimized.

Copy link

misterjoonas commented Nov 1, 2012

Most color schemes don't seem to work with diff, but Monokai looks great.

@jonaf

This comment has been minimized.

Copy link

jonaf commented Jun 6, 2013

To make this work for other themes, the short-cut is to modify the *.tmTheme file for the theme you want to work, and copy over the diff definitions from the Monokai theme. I added this to my *.tmTheme file for the Wombat theme, and it works fine. (Note, you can change the hex values if you want to forcibly choose a different color scheme for diff specifically to better match your theme, i.e. if it's a light-on-dark theme.)

        <dict>
            <key>name</key>
            <string>diff.header</string>
            <key>scope</key>
            <string>meta.diff, meta.diff.header</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#75715E</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>diff.deleted</string>
            <key>scope</key>
            <string>markup.deleted</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#F92672</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>diff.inserted</string>
            <key>scope</key>
            <string>markup.inserted</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#A6E22E</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>diff.changed</string>
            <key>scope</key>
            <string>markup.changed</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#E6DB74</string>
            </dict>
        </dict>
@swill

This comment has been minimized.

Copy link

swill commented Sep 17, 2013

@jonaf: Thank you for this. It was exactly what I was looking for.

This is what I am using with the iPlastic theme:

        <dict>
            <key>name</key>
            <string>diff.header</string>
            <key>scope</key>
            <string>meta.diff, meta.diff.header</string>
            <key>settings</key>
            <dict>
                <key>fontStyle</key>
                <string>italic</string>
                <key>foreground</key>
                <string>#0066FF</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>diff.deleted</string>
            <key>scope</key>
            <string>markup.deleted</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#C30D19</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>diff.inserted</string>
            <key>scope</key>
            <string>markup.inserted</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#009933</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>diff.changed</string>
            <key>scope</key>
            <string>markup.changed</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#FF8000</string>
            </dict>
        </dict>

Which looks like this:
image

@floodkoff

This comment has been minimized.

Copy link

floodkoff commented Aug 18, 2014

@swill thank you for iPlastic theme diff solution

bkputnam pushed a commit to bkputnam/iPlastic-custom that referenced this issue Aug 13, 2015

bkputnam pushed a commit to bkputnam/iPlastic-custom that referenced this issue Aug 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment