Name

vimdiff

Synopsis

    vimdiff [options] file1 file2 [file3]
    gvimdiff [options] file1 file2 [file3]

Edit two or three files with vim, highlighting the differences. If invoked as gvimdiff, the GUI is used instead. This sets the diff, wrap, and scrollbind options. It also sets foldmethod=diff and foldcolumn=2, which puts ranges of lines that aren’t changed into a fold and makes folds easy to spot.

By default, the screen is split vertically, as if with -O. Use -o to get a horizontal split.

For more information about vim, see Chapter 9.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.