Meld is a tool which allows the user to see the changes in, and merge between, either two files, two directories, or two files with a common ancestor. It can be integrated into Gedit for easy use.

Install Meld

Meld by default is available in Ubuntu official repository, just search and install from Ubuntu Software Center or run this command in a command console:

sudo apt-get install meld

After installation, launch Meld under Applications -> Programming menu.

Integrate into Gedit

First, install Zenity with the command below:

sudo apt-get install zenity

Then, open Gedit under Applications -> Accessories menu. Head to Edit -> Preferences -> Pluginstab, check “External Tools” and click “Configure Plugin” at right-bottom.

In next window click the button at left-bottom to add new tool and name Meld (here can set a shortcut key to quick launch Meld while using Gedit), in right box copy and paste following code and finally save the change.

#!/bin/sh 
meld $GEDIT_CURRENT_DOCUMENT_DIR/$GEDIT_CURRENT_DOCUMENT_NAME `zenity \
--file-selection --title="File for comparsion" --filename=/home/` &

facebooktwittergoogle_plus