[Back to main] [Printable version] [Search] [Leave a comment] Comments

Name

imediff2 — An interactive fullscreen 2-way merge tool

Synopsis

imediff2 [-m] [-u] [-a] [-b] [-c] {-o outputfile} {file1} {file2}

DESCRIPTION

Merge two (slightly different) files interactively with a user friendly fullscreen interface in text mode.

imediff2 shows the differences of given two files (in color if the terminal supports them), lets you scroll the file and toggle changes between old and new version one by one. If the 'unresolved' mode is enabled, you can optionally save both versions.

Empty lines are shown in reverse so you see that you can select them. If a line is missing completely from one file, imediff2 displays it as a reversed '?'. While it seems to take one line in the editing phase, it is naturally not saved in the output file.

To see list of keyboard commands, hit h or ? in the editor.

OPTIONS

The program follow the usual GNU command line syntax, with long options starting with two dashes (`-').

-o outputfile, --output=outputfile

Write output to given file.

-m, --mono

Force monochrome display.

-u, --unresolved

Enable 'unresolved' mode (see above).

-a

Start with version A (default).

-b

Start with version B.

-c

Start with unresolved changes (implies -u).

-h, --help

Show summary of options.

KEYBOARD COMMANDS

The following keyboard commands are available in the editor.

h, ?

Show commands.

up, down, left, right

Move in document.

page up, page down

Move a screenfull.

enter

Toggle selected change.

n, tab, space

Jump to next change.

p

Jump to previous change.

a

Set current chunk to version A.

b

Set current chunk to version B.

u

Set current chunk to unresolved.

shift+a

Set all changes to version A.

shift+b

Set all changes to version B.

shift+u

Set all changes to unresolved.

e

Launch external editor.

r

Discard editor-made changes. (Available only after e.)

x, s

Save and exit.

q, ctrl+c

Exit without saving.

home, end

Jump to start or end.

EXTERNAL EDITOR

The e command is only available if $EDITOR variable is set or if /usr/bin/editor exists and is executable.

SEE ALSO

sdiff (1), diff (1).

AUTHOR

This manual page as well as the program itself was written by Jarno Elonen (). Unlike the program itself, this document has been placed into the Public Domain.

blog comments powered by Disqus