I am unable to configure git to follow my requests:

  1. use vim as a diff pager
  2. keep colours for diff when adding files in interactive mode

My ~/.gitconfig setup:

[color]
    ui = auto
    # diff = false

[pager]
    diff = vim -

With this configuration the interactive mode for git add --interactive produces coloured output as expected:

interactive adding

The downside of this is that diff in vim is corrupted. See the output of git diff:

diff using vim

When using git diff | vim - the colours are OK but I'm too lazy to type the full command. Is there any known method that preserves colours in both cases?

Edit
Report