---
name: "imediff"
section: "1"
platform: "linux"
package: "imediff"
version: "3.4.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/imediff"
---

# imediff(1)

An interactive fullscreen merge tool for 2 or 3 files

## 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)](/sdiff/1.md), [diff(1)](/diff/1.md), [merge(1)](/merge/1.md), [diff3(1)](/diff3/1.md).

## 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 Jarno Elonen \<elonen@iki.fi\>, Osamu Aoki \<osamu@debian.org\>\
