Using vim as git difftool

I configured Vim as git diffftool in .gitconfig

[diff] tool = vimdiff 

If there are changes in the N files, I have to close vim (: qa) to see the next diff.

How to go to the next / previous section without exiting vim?

+6
source share
1 answer

There is no way to tell vimdiff to move to the next file, because git difftool calls vimdiff for each diff file.

So, when you finish vimdiff with qa , git diff executes vimdiff again with the following file. From the vimdiff point of view, there is no following diff file.

You can suppress the prompt to run vimdiff, which makes it less annoying:

git config --global difftool.prompt false

But, as you already learned, the vim vim-fugitive plugin is the way to go. This great plugin offers various commands for distinguishing and merging.

+5
source

All Articles