From HaFrWiki
Jump to: navigation, search

KDiff3 [1] is a KDiff3 is a diff and merge program that

  • compares or merges two or three text input files or directories,
  • Shows the differences line by line and character by character (!),
  • Provides an automatic merge-facility and
  • An integrated editor for comfortable solving of merge-conflicts,
  • Supports Unicode, UTF-8 and other codecs, autodetection via byte-order-mark "BOM"
  • Supports KIO on KDE (allows accessing ftp, sftp, fish, smb etc.),
  • Printing of differences,
  • Manual alignment of lines,
  • Automatic merging of version control history ($Log$),
  • and has an intuitive graphical user interface.
  • Windows-Explorer integration Diff-Ext-for-KDiff3 - shell extension included in installer (originally by Sergey Zorin: see also Diff Ext)
  • KDE-Konqueror/Dolphin service menu plugin
  • Simplified integration with IBM-Rational-Clearcase for Windows (Details).
  • Read what else is special in a short abstract (PDF).


KDiff3 has been implemented for:

  • Linux
  • Mac OSX
  • Windows
  • Unix


The Linux/Mac/Unix implementation of KDiff3 is able to use sed [2] as preprocessor. Ded makes it possible to filter the file-lines before comparing them, so enables the remove of not wanted comparison such as Version Control Statements (CVS/SVN).

However a very annoying bug is the fact that in the KDiff3 you need to use a double quote in stead of a single quote. Am example always helps. Suppose you don't want to compare the following code-line:

   @version: - 05 Mar 2013 - $Id: Webpage.php 149 2013-05-20 09:26:01Z machafr $

The line you can test with sed in terminal (Mac) is:

  cat Webpage.php | sed 's/^@version.*\$//'

In kDiff3 at the preference->diff->preprocessor command:

  sed "s/^@version.*\$//"

Nice workaround.

See also




  1. KDiff3, Homepage of kDiff3 at Source Forge.
  2. Sed, Unix command line reference.