vimdiff

Open up two or more files in vim and show the differences between them. See also: vim, vimtutor, nvim. More information: <https://www.vim.org>.

Install

All systems
curl cmd.cat/vimdiff.sh
Debian Debian
apt-get install vim
Ubuntu
apt-get install vim
Alpine
apk add vim
Arch Arch Linux
pacman -S vim
image/svg+xml Kali Linux
apt-get install vim
Fedora
dnf install vim-enhanced-2
Windows (WSL2)
sudo apt-get update sudo apt-get install vim
OS X
brew install vim
Raspbian
apt-get install vim
Docker
docker run cmd.cat/vimdiff vimdiff powered by Commando

Open up two or more files in vim and show the differences between them. See also: vim, vimtutor, nvim. More information: <https://www.vim.org>.

  • Open two files and show the differences:
    vimdiff path/to/file1 path/to/file2
  • Move the cursor to the window on the left|right:
    <Ctrl> + w h|l
  • Jump to the previous difference:
    [c
  • Jump to the next difference:
    ]c
  • Copy the highlighted difference from the other window to the current window:
    do
  • Copy the highlighted difference from the current window to the other window:
    dp
  • Update all highlights and folds:
    :diffupdate
  • Toggle the highlighted code fold:
    za

© tl;dr; authors and contributors