syntax coloring for diff/patch files

687 views
Skip to first unread message

axolx

unread,
Jul 8, 2009, 7:26:04 PM7/8/09
to BBEdit Talk
Does anyone know of any syntax coloring modules/plugins available for
diff/patch files?

Best,
Martin

Brian Forte

unread,
Nov 5, 2009, 7:15:18 PM11/5/09
to bbe...@googlegroups.com
Gentlefolk,

Way back on 2009/07/08, axolx <marti...@gmail.com>, asked:


>Does anyone know of any syntax coloring modules/plugins available for
>diff/patch files?

For some months now I've been spending a chunk of my days reading
patch files. Since I was mostly reading them, I was happy using
[MacVim][1] as, in effect, a viewer application for said files.

Today, however, I had cause to do things with a large patch file that
are easier in BBEdit (for me at least: my vi skills are basic
compared to my BBEdit-fu).

I Googled for a while and found axolx's question floating near the
top of multiple queries. Happily, I also found there are also at
least two Language Modules for diff and patch files: one from
['Pudge'][2] and another from [Ryan Wilcox][3].

Both modules appear to work fine. Wilcox's doesn't have a
BBLMLanguageSuffix for the '.patch' suffix, but adding one is a
five-second copy-paste-make-a-tiny-edit task.

Otherwise, the obvious differences between the two are the colours
used by default for syntax highlighting. Wilcox's module makes diffs
and patches look like other files BBEdit syntax highlights, using
muted, pastel colours.

Pudge's, OTOH, is reminiscent of the brighter and more contrasting
colours used by MacVim. (This is especially so if you follow the
advice in his diff.plist comments and change Comments and String
Constants to green and red respectively.)

Given the months between axolx's question and this answer, I hope
it's still useful to him. I threw this quick note together mostly
because, as I noted above, his original question was near the top of
several of my Google searches: adding this note to the thread seemed
the right thing to do given this.

[1]: <http://code.google.com/p/macvim/>
"MacVim project home on Google Code."

[2]: <http://pudge.net/glob/2008/08/bbedit-stuff-for-git-diff-and-jslint.html>
"BBEdit Stuff for Git, Diff, and JSLint."

[3]: <http://github.com/rwilcox/bbedit-diff-language-module>
"bbedit-diff-language-module on GitHub."

Regards,

Brian Forte.
--
words, edits, type, layout, code
<mailto:bfo...@betweenborders.com>
<http://betweenborders.com/>

Reply all
Reply to author
Forward
0 new messages