tools/vim

vimdiff usage

seul chan 2018. 6. 26. 23:44

vimdiff is equivalent to vim -d.

It’s easiest way to start editing diff mode with vim.

Basic usage

vimdiff file1 file2
# equals to
vim -d file1 file2

Cheat sheet

# remove leftover spacing issue
:diffupdate

# next / previous difference
]c :
[c :

# diff obtain
do

# diff put
dp

# open/close folded txt
zo
zc

# avoid whitespace comparision
:set diffopt+=iwhite

vimdiff documentation