Invokes vim in diff mode on your git changes, with capability to navigate across pairs of files. Typically, the right hand is editable.
Installation & Usage
$ curl https://raw.github.com/philz/git-vimdiff/master/git-vimdiff > ~/bin/git-vimdiff $ chmod ugo+x ~/bin/git-vimdiff $ ~/bin/git-vimdiff [options for git diff]
I commonly use
Then, in vim, use
Ctrl-P to navigate to the
next and previous pairs of files.
at the beginning.
git-vimdiff before sending code out for review. It lets
me see the code in the same way how a reviewer would see it (if
they were using Reviewboard or Mondrian or gerritt or whatever other
side-by-side review tool). Because the right-hand side is editable,
I typically add comments, fix spelling errors, and do other cleanup
in this last pass.
git-difftool calls vimdiff on every pair of files that
change. Hence, navigating requires you popping out of vim.
To avoid complicated installation instructions, git-vimdiff is "statically linked," in that it encompasses two shell scripts and a vim program, but they're all inside of one shell script. The outer shell script calls git diff, which then calls the inner shell script, which copies the changed files. The outer shell script than calls vim, with a supplied vim program to set up diff mode, and navigation.
git-vimdiff is based on a hack by by John Reese (firstname.lastname@example.org). Philip Zeyliger adapted it for git.