Skip to content

Instantly share code, notes, and snippets.

@thomasfaingnaert
Last active February 2, 2021 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasfaingnaert/22ecc01843b07162b294fc21274a2abb to your computer and use it in GitHub Desktop.
Save thomasfaingnaert/22ecc01843b07162b294fc21274a2abb to your computer and use it in GitHub Desktop.
Vim pairwise diff

Oneliner to diff a set of files pairwise in different tabs with Vim:

gvim -R -c 'for i in range(1, argc() - 1) | if i % 2 == 1 | rightbelow vertical diffsplit | next | diffthis | else | tabedit | next | endif | endfor' a b c d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment