# git color in commit editor

6 messages from 2011-01-06 to 2011-01-09. Participants: Pavan Savoy, Thomas Rast, Matthijs Kooijman, Ævar Arnfjörð Bjarmason, Jonathan Nieder.
Thread: https://gitlist.dev/t/26213

## Pavan Savoy, 2011-01-06 06:42

Subject: git color in commit editor
Message-ID: <AANLkTimMZaSW4ZUS60Vo38vyuq-PPqPhGdCVZjFzF2Gs@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimMZaSW4ZUS60Vo38vyuq-PPqPhGdCVZjFzF2Gs%40mail.gmail.com

```
I am not sure, If this is a right list, Is there a git users mailing
list too somewhere out there ?
Anyway the question is simple,

I have git version git version 1.5.6.3, on 1 system and get the colors
right during a git commit (commit editor being vim..)
On another machine with same vim version and same gitconfig and pretty
much all the same settings except that the
git version is git version 1.6.3.3, I don't have color in the commit editor...

Moving to newer GIT versions didn't help either...
What am I missing?


regards,
Pavan

```

## Thomas Rast, 2011-01-06 10:06

Subject: Re: git color in commit editor
Message-ID: <201101061106.50636.trast@student.ethz.ch>
URL: https://gitlist.dev/e/201101061106.50636.trast%40student.ethz.ch
In-Reply-To: <AANLkTimMZaSW4ZUS60Vo38vyuq-PPqPhGdCVZjFzF2Gs@mail.gmail.com>

```
Pavan Savoy wrote:
> On another machine with same vim version and same gitconfig and pretty
> much all the same settings except that the
> git version is git version 1.6.3.3, I don't have color in the commit editor...
> 
> Moving to newer GIT versions didn't help either...
> What am I missing?

That's squarely in vim's domain, git does not (and cannot) impose any
colors on the editor.  So you need to configure vim on the second
machine for the highlighting.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```

## Matthijs Kooijman, 2011-01-06 10:15

Subject: Re: git color in commit editor
Message-ID: <20110106101531.GU3069@login.drsnuggles.stderr.nl>
URL: https://gitlist.dev/e/20110106101531.GU3069%40login.drsnuggles.stderr.nl
In-Reply-To: <AANLkTimMZaSW4ZUS60Vo38vyuq-PPqPhGdCVZjFzF2Gs@mail.gmail.com>

```
Hey Pavan,

> I have git version git version 1.5.6.3, on 1 system and get the colors
> right during a git commit (commit editor being vim..)
> On another machine with same vim version and same gitconfig and pretty
> much all the same settings except that the
> git version is git version 1.6.3.3, I don't have color in the commit editor...
Try the ":syntax on" command in your vim (without the quotes, with the
colon).

You can put it in your ~/.vimrc file as well (without the colon there).

Gr.

Matthijs

```

## Ævar Arnfjörð Bjarmason, 2011-01-06 10:58

Subject: Re: git color in commit editor
Message-ID: <AANLkTimAXV9u4FfL2cv5vE9oDgs-LfJu2DopRw=FEqUE@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimAXV9u4FfL2cv5vE9oDgs-LfJu2DopRw%3DFEqUE%40mail.gmail.com
In-Reply-To: <AANLkTimMZaSW4ZUS60Vo38vyuq-PPqPhGdCVZjFzF2Gs@mail.gmail.com>

```
On Thu, Jan 6, 2011 at 07:42, Pavan Savoy <pavan_savoy@sify.com> wrote:
> I have git version git version 1.5.6.3, on 1 system and get the colors
> right during a git commit (commit editor being vim..)

FWIW here's how to get those colors under Emacs:
https://github.com/rafl/git-commit-mode

```

## Pavan Savoy, 2011-01-09 18:26

Subject: Re: git color in commit editor
Message-ID: <AANLkTikns9XyM48HkggaKFEsj61hP1y3Y-QczA0Pp9Bs@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikns9XyM48HkggaKFEsj61hP1y3Y-QczA0Pp9Bs%40mail.gmail.com
In-Reply-To: <AANLkTimAXV9u4FfL2cv5vE9oDgs-LfJu2DopRw=FEqUE@mail.gmail.com>

```
On Thu, Jan 6, 2011 at 4:28 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Thu, Jan 6, 2011 at 07:42, Pavan Savoy <pavan_savoy@sify.com> wrote:
>> I have git version git version 1.5.6.3, on 1 system and get the colors
>> right during a git commit (commit editor being vim..)
>
> FWIW here's how to get those colors under Emacs:
> https://github.com/rafl/git-commit-mode
>

Thanks, I do have syntax on in my vimrc, as I mentioned, I also have colors in
vim for .c files on both machines...
The only differences being git versions, also what syntax or color
format would vim get for git and from where?

```

## Jonathan Nieder, 2011-01-09 18:33

Subject: Re: git color in commit editor
Message-ID: <20110109183304.GB7718@burratino>
URL: https://gitlist.dev/e/20110109183304.GB7718%40burratino
In-Reply-To: <AANLkTikns9XyM48HkggaKFEsj61hP1y3Y-QczA0Pp9Bs@mail.gmail.com>

```
Pavan Savoy wrote:

> Thanks, I do have syntax on in my vimrc, as I mentioned, I also have colors in
> vim for .c files on both machines...
> The only differences being git versions, also what syntax or color
> format would vim get for git and from where?

$ find /usr/share/vim -name git\*
/usr/share/vim/vim73/ftplugin/gitconfig.vim
/usr/share/vim/vim73/ftplugin/gitsendemail.vim
/usr/share/vim/vim73/ftplugin/gitrebase.vim
/usr/share/vim/vim73/ftplugin/gitcommit.vim
/usr/share/vim/vim73/ftplugin/git.vim
/usr/share/vim/vim73/indent/gitconfig.vim
/usr/share/vim/vim73/syntax/gitconfig.vim
/usr/share/vim/vim73/syntax/gitsendemail.vim
/usr/share/vim/vim73/syntax/gitrebase.vim
/usr/share/vim/vim73/syntax/gitcommit.vim
/usr/share/vim/vim73/syntax/git.vim

":help :syn-files" explains how to use them.

Hope that helps,
Jonathan

```
