Sublime Forum

Possible to make git diff use the same color scheme?

#1

… as a textmate bundle? I love the color scheme I’m currently using, but when I do a git diff it just shows it in all white text, ignoring the color scheme. It doesn’t do this with the built-in color schemes that come with ST2.

Thoughts?

0 Likes

#2

I guess that the theme doesn’t provide colors for the scopes used by git diff. Position the cursor on something you’d like to see in some color (such as a line added, say). Then open the console and enter this:

view.scope_name(view.sel()[0].begin())

I did that with the cursor on the word “class” in a Python file and got this:

u'source.python meta.class.python storage.type.class.python '

So if my theme were to specify a color for “storage.type.class.python”, say, then I would be happy.

I don’t use git myself, so I haven’t looked at the result of git diff.

0 Likes