Home Download Buy Blog Forum Support

Possible to make git diff use the same color scheme?

Possible to make git diff use the same color scheme?

Postby ryanlecompte on Fri Dec 30, 2011 5:03 am

... 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?
ryanlecompte
 
Posts: 20
Joined: Wed Dec 28, 2011 2:16 pm

Re: Possible to make git diff use the same color scheme?

Postby hibbelig on Fri Dec 30, 2011 12:20 pm

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:
Code: Select all
view.scope_name(view.sel()[0].begin())

I did that with the cursor on the word "class" in a Python file and got this:
Code: Select all
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.
hibbelig
 
Posts: 77
Joined: Wed Dec 21, 2011 11:24 pm


Return to General Discussion

Who is online

Users browsing this forum: MystickPhoenix and 17 guests