Using vim as git difftool

I’ve configured Vim as git difftool in .gitconfig

[diff]
    tool = vimdiff

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

  • Using Visual Studio 2012's built-in merge tool with Git
  • how do I keep git config entries across pulls
  • What is the difference between 'git format-patch and 'git diff'?
  • Unable to diff files in two separate branches in Git
  • Filtering a diff with a regular expression
  • Mercurial diff not working after move/rename
  • How do i navigate to the next/previous diff without quitting vim?

  • Git Repository How to recover deleted files?
  • git-svn commits to wrong branch / how to merge svn branch via git-svn
  • How do I add a git submodule in a non empty directory?
  • Resolve recursive git cookbook dependencies with Berkshelf
  • Git: Recover the deleted remote branch
  • How do I get git svn diff to use svn's internal diff engine?
  • 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 qa, 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.

    Git Baby is a git and github fan, let's start git clone.