[openstack-dev] [OpenStack-Infra] Announcing Gertty 1.4.0

James E. Blair corvus at inaugust.com
Mon Aug 1 21:00:12 UTC 2016


Masayuki Igawa <masayuki.igawa at gmail.com> writes:

> Hi!
>
> On Wed, Jul 27, 2016 at 11:50 PM, James E. Blair <corvus at inaugust.com> wrote:
>> Michał Dulko <michal.dulko at intel.com> writes:
>>
>>> Just wondering - were there tries to implement syntax highlighting in
>>> diff view? I think that's the only thing that keeps me from switching to
>>> Gertty.
>>
>> I don't know of anyone working on that, but I suspect it could be done
>> using the pygments library.
>
> Oh, it's an interesting feature to me :) I'll try to investigate and
> implement in next couple of days :)

As I think about this, one challenge in particular comes to mind: Gerrit
uses background color (green and pink) to distinguish old and new
text when displaying diffs.  In Gertty, I avoided that and used
foreground colors instead because text with green and red backgrounds is
difficult to read on a terminal.

We essentially have two channels of information that we want to
represent with color -- the diff, and the syntax.  They can sometimes
overlap.

Perhaps we could use a 256 color (or even RGB) terminal for this
feature.  Then we may be able to get just the right shade of background
color for the diff channel, and use the foreground colors for syntax
highlighting.

At any rate, it may be worth trying to solve *this* problem first with a
mockup to see if there is any way of doing this without making our eyes
bleed before working on the code to implement it.

-Jim



More information about the OpenStack-dev mailing list