Syntax highlighting diff

Lukas Fleischer cgit at
Fri Aug 26 17:38:39 CEST 2011

On Thu, Aug 25, 2011 at 12:56:21PM -0500, Imran Aziz wrote:
> Hi All,
> I have newly setup cgit and so far like it very much. Thanks Lars and
> others for building this great tool.
> I was wondering what are the thoughts of the developers here on syntax
> highlighting the diffs, it does helps me with reviewing my changes as
> the keywords are  easily noticeable.
> can you please direct me to any tools that you know of that could be
> easily integrated or perhaps someone else has already done it.

You can use the "source-filter" configuration variable [1], [2] to
specify any filter. There's an example filter that uses highlight(1) [3]
in the source tree [4].

> Other thoughts:
> One tweak I made to cgit.css was to change the "white-space" property
> for ssdiff table to "pre-wrap". This allows me to review long lines of
> code without having to scroll left and right horizontally. Any
> comments?

Feel free to do that. -1 to including this in mainline, though.


More information about the CGit mailing list