I’d like to be able to run a command that opens up a git diff in vim, with a tab for each file in the diff set.
So if for example I’ve changed files foo.txt and bar.txt in my working tree and I ran the command I would see vim open with two tabs. The first tab would contain a side-by-side diff between foo.txt in my working tree and foo.txt in the repository, and the second tab would contain a side-by-side diff for bar.txt.
Anyone got any ideas?
The way I would do this (though it isn’t a single command)
Open files with changes in new
vimtabs:vim -p $(git diff –name-only)
For every buffer get the diff to your current HEAD with the vcscommand vim plugin
:VCSVimDiff
This gives a nice view of the difference, though not in patch form.
For anything else I would stick to
git diff.EDIT
Like Dave writes below, steps 1 and 2 can be combined by using