Macos 提交时如何在vim中获得git diff着色?

Macos 提交时如何在vim中获得git diff着色?,macos,git,vim,git-diff,Macos,Git,Vim,Git Diff,当我查看git diff时,我看到删除和添加行的所有漂亮颜色。然而,当我git commit-av阅读并拒绝或接受提交时,我所拥有的只是丑陋的单色文本 我的.gitconfig包含: [color] diff = auto status = auto branch = auto ui = true [core] excludesfile = ~/.gitignore editor = vim 我知道

当我查看
git diff
时,我看到删除和添加行的所有漂亮颜色。然而,当我
git commit-av
阅读并拒绝或接受提交时,我所拥有的只是丑陋的单色文本

我的
.gitconfig
包含:

[color]
        diff = auto
        status = auto
        branch = auto
        ui = true [core]
        excludesfile = ~/.gitignore
        editor = vim
我知道它能工作,因为我以前在Ubuntu机器上安装过它。我在OSX上安装了git和自制软件


如何获得这些漂亮的颜色?

我必须设置
~/.vimrc
并添加:

syntax on