Advertisements

Coda syntax highlighting for .diff or .patch files

I switched to Coda recently and I’m loving it so far except for a few minor issues. One problem I’ve been having is the lack of syntax highlighting for .diff or .patch files. When I have big commits or large changes of code I will often generate a .diff file and then view it in my editor. My old editor, Aptana, did this but Coda just shows it as plain text.

I decided to take some time last week and make a highlighting mode .diff/.patch files. The code can be found at https://github.com/justinshreve/DIFF.mode. All you need to do is copy the “DIFF.mode” folder to “~/Library/Application Support/Coda/Modes”.