IMEDIFF(1)

NAME
imediff - An interactive fullscreen merge tool for 2 or 3 files

SYNOPSIS

imediff [-h] [-v] [-abcdfg] [-o OUTPUT] [-m] [-n] [-s] [-t] [-l] [-...] {file_a} {file_b} [file_c]

DESCRIPTION

Merge two (slightly different) files with an optional common base file interactively with a user friendly fullscreen interface in the full screen text terminal mode.

For diff2 case, these files are:

    • file_a == OLDER

    • file_b == NEWER

For diff3 case, these files are:

    • file_a == MYFILE

    • file_b == OLDFILE (base file)

    • file_c == YOURFILE

imediff shows the differences of given two files (in color if the terminal supports them), lets you scroll the file and toggle changes between older and newer version for each chunk of difference. You can also select line diff and character wdiff mode for display. If you wish to make manual changes, you can edit each chunk with editor. The result of merge operation is saved in OUTPUT. If this is missing, STDERR is used.

Additionally, you can customize your choice of editor via $EDITOR or ~/.imediff. The default editor is /usr/bin/editor.

Removed lines are shown in reversed '???' as a placeholder, so you see that and you can select them. While it takes one line on display, it is naturally not saved into the output file.

To see the key binding, hit h in the main imediff screen.

To see the tutorial, hit H in the main imediff screen or simply start the imediff command without arguments.

The program exits with status 0 if the changes were saved, 1 if the merging was aborted and 2 if the parameters were invalid.

OPTIONS

-h, --help
    Show summary of options and exit.

-a
    Start with all chunks to use file_a.

-b
    Start with all chunks to use file_b.

-c
    Start with all chunks to use file_c (only for diff3).

-d
    Start with all chunks to use diff.

-f
    Start with all chunks to use wdiff.

-g
    Start with good merge mode. (only for diff3)

-o OUTPUT, --output=file_output
    Write output to a given file. If this is missing, STDERR is used.

-l, --force-logging
    Force LOGFILE="imediff.log" and LOGLEVEL="INFO".

-n, --non-interactive
    Use non-interactive CLI instead of normal TUI.

-s, --sloppy
    Allow one to save unresolved contents.

-t, --template
    Create a template configuration file ~/.imediff .

-v, --version
    Show version and license.

-...
    For other options, see the tutorial by starting "imediff" without any arguments.

SEE ALSO

sdiff(1), diff(1), merge(1), diff3(1).

COPYRIGHT

This manual page as well as the program itself was written by Jarno Elonen <elonen@iki.fi> and Osamu Aoki <osamu@debian.org>. Unlike the program itself, which is licensed under the GNU General Public License (GPL) version 2 (or any later version, at your option), this document has been placed into the Public Domain.

AUTHORS

Jarno Elonen <elonen@iki.fi>
    Original author for 2 file merge in python2

Osamu Aoki <osamu@debian.org>
    Rewrite author for 2 and 3 file merge in python3

COPYRIGHT
Copyright © 2003-2006, 2018-2025 Jarno Elonen <elonen@iki.fi>, Osamu Aoki <osamu@debian.org>