neovim as git difftool (mergetool)

I moved completely to neovim. It’s my default editor, to the point that I don’t bother installing new plugins for vim. And that’s how I realised that git difftool is still using vim.

I recently installed a new colorscheme using Plugged, and launching git difftool would give me errors, because I didn’t install it for vim. The solution turned out to be simple. Git’s mergetool has the option to configure path for the desired tool. So I’ve set up mergetool to use vimdiff (diftool will use the same tool by default).

git config --global merge.tool vimdiff
git config --global mergetool.vimdiff.path nvim

 

Leave a Reply

Your email address will not be published. Required fields are marked *