This should do what you want:
$ GIT_EDITOR="vim -c 'normal gg/^diff^MdGgg:vnew^MP:set ft=diff^M'"
$ export GIT_EDITOR
$ git commit -v
The "^M" is the enter key (carriage return), entered by pressing Ctrl+V and then pressing enter.
The argument to the "-c" option tells vim to
- Go the the top of the file
- Go the first diff hunk
- Cut all the diff hunks (until the end of the file)
- Create a new window vertically on the left of the current window (see 'splitright' option if you don't like this position)
- Paste the diff hunks
- Set the file type to diff to get the nice highlighting (you do have "syntax on" in your .vimrc, do you?)
Obviously you want this command to be invoked only when you run "git commit -v" and nowhere else because the vim command sequences applies only in that case so it might not be a good idea to set GIT_EDITOR as such.
A better configuration is use alias:
$ alias gcv="GIT_EDITOR=\"vi -c 'normal gg/^diff^MdGgg:vnew^MP:set ft=diff^M'\" git commit -v"