{
    "mode": "man",
    "parameter": "VIMDIFF",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/VIMDIFF/1/json",
    "generated": "2026-06-16T06:08:30Z",
    "synopsis": "vimdiff [options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]",
    "sections": {
        "NAME": {
            "content": "vimdiff - edit between two and eight versions of a file with Vim and show differences\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "vimdiff [options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]\n",
            "subsections": [
                {
                    "name": "gvimdiff",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "Vimdiff starts Vim on two up to eight files.  Each file gets its own window.  The differences\nbetween the files are highlighted.  This is a nice way to inspect changes and to move changes\nfrom one version to another version of the same file.\n\nSee vim(1) for details about Vim itself.\n\nWhen started as gvimdiff the GUI will be started, if available.\n\nIn each window the 'diff' option will be set, which causes the differences to be highlighted.\nThe 'wrap' and 'scrollbind' options are set to make the text look good.\nThe  'foldmethod'  option  is  set to \"diff\", which puts ranges of lines without changes in a\nfold.  'foldcolumn' is set to two to make it easy to spot the folds and open or close them.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Vertical splits are used to align the lines, as if the \"-O\" argument was used.  To use  hori‐\nzontal splits instead, use the \"-o\" argument.\n\nFor all other arguments see vim(1).\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "vim(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Most  of Vim was made by Bram Moolenaar, with a lot of help from others.  See \":help credits\"\nin Vim.\n\n\n\n2001 March 30                                 VIMDIFF(1)",
            "subsections": []
        }
    },
    "summary": "vimdiff - edit between two and eight versions of a file with Vim and show differences",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "vim",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/vim/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Open up two or more files in vim and show the differences between them.",
        "examples": [
            {
                "description": "Open two files and show the differences",
                "command": "vimdiff {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Move the cursor to the window on the left|right",
                "command": "<Ctrl w>{{<h>|<l>}}"
            },
            {
                "description": "Jump to the previous difference",
                "command": "<[><c>"
            },
            {
                "description": "Jump to the next difference",
                "command": "<]><c>"
            },
            {
                "description": "Copy the highlighted difference from the other window to the current window",
                "command": "<d><o>"
            },
            {
                "description": "Copy the highlighted difference from the current window to the other window",
                "command": "<d><p>"
            },
            {
                "description": "Update all highlights and folds",
                "command": "<:>diffupdate"
            },
            {
                "description": "Toggle the highlighted code fold",
                "command": "<z><a>"
            }
        ]
    }
}