TOOL ยป VIM

Diff

Usage โ€‹

CommandDescription
diffthisAdd current window to the diff (needs two files).
diffoffRemove current window from the diff.

Diff current tab windows โ€‹

It may be useful to use the windo command, that runs a command to all visible windows.

With two windows opened:

vimscript
windo diffthis
windo diffoff

Open and diff โ€‹

With one of the files opened, open the another with:

vimscript
vert diffsplit FILE2