Using vim as git difftool
[diff] tool = vimdiff
If there are changes in N files, i have to close vim (:qa) to see the next diff.
- How Do You Get the bufspec While Using Vimdiff Through Git
- How do you cancel an external git diff?
- vimdiff between current and previous git version of a file
- Why does git mergetool opens 4 windows in vimdiff? (I'd expect 3)
- vimdiff: enable diff mode between certain buffers
- How to prevent git vimdiff from opening files as read-only?
How do i navigate to the next/previous diff without quitting vim?
One Solution collect form web for “Using vim as git difftool”
There is no way to tell vimdiff to go to the next file, because
git difftool invocates vimdiff for each diff file.
So when you end vimdiff with
git diff executes vimdiff again with the next file. From vimdiff’s perspective there is no next diff file.
You can suppress the prompt for launching vimdiff, which makes it less annoying:
git config --global difftool.prompt false
But, as you already found out yourself, the vim plugin vim-fugitive is the way to go. This excellent plugin offers various commands for diffing and merging.