Archive for the ‘differences’ tag
Colored Diffs add-on for Thunderbird
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.
- Download the colored diffs *.xpi file
- Open the archive with an archive manager of your choice
- Edit the contained install.rdf with a text editor of your choice
- 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>
- Save the changes and store them back into the archive
- 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.
Coloring differences at a word-level using gitk
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.