I use Windows, so I do not have a terminal with good color support. Because of this, I want to use gvim for my diff tool.
However, I'm not sure how to set it up so that git uses it by default, and the only way I know how to use gvimdiff is to call gvim -d.
How would I get it set up properly?
As an alternative, have you thought about using fugitive?
I'm not going to lie to you; fugitive.vim may very well be the best Git wrapper of all time.
There is a an excellent Vimcasts episode, Fugitive.vim - resolving merge conflicts with vimdiff, by Drew Neil. This is part of a series on fugitive.
To use fugitive you can just run :Gdiff to get git diff of the current file. Bonus: you can use fugative.vim inside of GVim, MacVim, or whatever Vim gui you have.
Fugitive has a lot more to offer than just being a diff tool so make sure you read the documentation and/or check out the vimcasts.
git difftoolUse git difftool and pick gvimdiff. e.g. git difftool --tool gvimdiff instead of git diff. For more help see git difftool --help and git difftool --tool-help. You may also want to look into setting diff.guitool or diff.tool config options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With