[TxMt] Coloured diff display?

Kevin Horton khorton01 at rogers.com
Mon Jul 30 12:18:24 UTC 2007


On 25 Jul 2007, at 10:01, Kevin Horton wrote:

> On 25 Jul 2007, at 09:28, Ciarán Walsh wrote:
>
>> On 25 Jul 2007, at 14:07, Kevin Horton wrote:
>>
>>> I am trying TextMate on two machines, both PPC.  One machine  
>>> displays subversion diffs with colours (the default behaviour, I  
>>> believe), but the other has plain old black text with white  
>>> background.  I am not aware of having made any selections that  
>>> should have caused the difference in behaviour between the two  
>>> machines.  I looked in the Preferences -> Fonts and Colors on the  
>>> machine with no colours in the diffs, and I see nothing that  
>>> appears to be related to diffs.  I moved ~/Library/Preferences/ 
>>> com.macromates.textmate.plist aside and started TextMate again,  
>>> but the diffs are still monochrome.  Where else should I look?
>>
>> Have you set the language to Diff in the status bar?
>
> Ahh.  That gives me coloured diffs.  Thanks.
>
> But, there is still a puzzling difference in behaviour between the  
> two machines.  On one machine, diffs are automatically detected as  
> language Diff.  On the other machine, they come up as language  
> Plain Text.  What could explain the difference?

I've finally found why the two machines behaved differently.  On the  
machine that did not detect diffs as language Diff, today I noted  
that the first line of the diff was actually a ruby warning that my ~/ 
bin directory was world writable.  I changed the permissions, and now  
the diffs do not have that warning as the first line, and they are  
automatically detected as language Diff.

I am left with one comment - if it is important that my ~/bin not be  
world writable, perhaps there is a better way to inform the user than  
hide a warning line at the top of a diff.  Given that this is the  
only time TextMate has warned me about this, I suspect that it is not  
considered a TextMate concern, and ruby is the culprit.  Perhaps this  
ruby warning should be caught, and not make it to the diffs.

Kevin Horton
Ottawa, Canada





More information about the textmate mailing list