avp::ptr weblog

Everything that is in our mind.

Archive for the ‘differences’ tag

Colored Diffs add-on for Thunderbird

with 2 comments

Reading todays post-hook emails with the latest diffs of some project the thought rushed to my head that it would be nice to have the diffs displayed in color. Since I am using Thunderbird as my email client I found a great add-on named “Colored Diff”.

Although, the add-on seems to be outdated to work with the latest Thunderbird version (which is 10.0 right now) there is an easy way to install the add-on while the automatic installer refuses to do so. Here is what you can do to make the installation work.

  1. Download the colored diffs *.xpi file
  2. Open the archive with an archive manager of your choice
  3. Edit the contained install.rdf with a text editor of your choice
  4. Change the maxVersion parameter to be equal or greater then the current version of Thunderbird
    Before: <em:maxVersion>3.1.*</em:maxVersion>
    After: <em:maxVersion>13.1.*</em:maxVersion>
  5. Save the changes and store them back into the archive
  6. Install the add-on

Do not forget to check out the preferences after you installed the add-on. You can choose 4 different types to display the diffs and customize the colors as well.

If you feel interested to enhance the add-on you can do so. The “Colored diffs” project is hosted on Google Code open for people to participate.

Written by tobi

February 8th, 2012 at 4:33 pm

Coloring differences at a word-level using gitk

without comments

Due to their default behavior to handle differences on a line-by-line level most of the version control systems seem to be impractical when writing texts others than source code. Also git highlights changes to text files line-wise.

After some research I found some nice options to improve things.

Coloring words using git diff

git diff --color-words

Coloring words using gitk

gitk --word-diff=plain
gitk --word-diff=porcelain
gitk --word-diff=color

The gitk parameter option seems to be new and/or undocumented since I could neither find it on the man page of gitk nor I did get it with the auto-completion. Please find further interesting thoughts in the discussion of András Salamon on StackExchange and Eduardo’s post. Also Iain Murray’s cwdiff wrapper might be worth taking a closer look.

Gitk differences colored at line-level

Gitk differences colored at line-level

Gitk differences colored at word-level

Gitk differences colored at word-level

Written by tobi

August 14th, 2011 at 1:08 am