I've have two files opened. They are opened in vertical mode, next to next. Can I instantly diff these two files without leaving or closing Vim ?
To begin diffing on all visible windows:
:windo diffthis
which executes :diffthis
on each window.
To end diff mode:
:diffoff!
(The !
makes diffoff
apply to all windows of the current tab - it'd be nice if diffthis
had the same feature, but it doesn't.)