Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just recently switched over to Mac. On windows I was using git through the msysgit project. When doing a git rebase -i I'm used to get a nice syntax highlighting in vim. I'm missing it badly now that I'm on Mac. How can I get it back?

share|improve this question

migrated from Sep 10 '12 at 8:35

This question came from our site for professional and enthusiast programmers.

Is it syntax highlighted when you do outside of vim? – Conner Sep 9 '12 at 21:29
the colors for the git log etc do work, yes. I have git config --global color.ui true – Christoph Sep 9 '12 at 21:32
Did you not copy your previous Vim config over? – Andrew Marshall Sep 9 '12 at 21:56
msysgitseemed to abstract all those difficulties away from the end user. All the highlighting worked just out of the box so until my first interactive rebase on my new MacBook I didn't even know that something like a vim config does even exist :) – Christoph Sep 9 '12 at 22:34
as a side note, may i introduce you to vim-fugitive ? (see the screencasts on…) – tshirtman Sep 9 '12 at 23:11
up vote 22 down vote accepted

I just figured out all I need is to create a ~/.vimrc file with a line that reads syntax on

share|improve this answer
you should mark your answer as correct. It helped me for sure! – snowe2010 Mar 14 at 17:18

You probably need to set up an autocmd in your .vimrc to recognise the appropriate file as a rebase -i temporary:

autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase

Then you just need to use a syntax file ~/.vim/syntax/gitrebase.vim and put in whatever highlighting commands match your preferences such as the one supplied with recents vims:

share|improve this answer
I created the .vimrcat ~/ with the line that you postet and also created the gitrebase.vim file at ~/.vim/syntax/ with the content from that link. Then I reopened the terminal and tried it. It doesn't work. Anything I might be missing? – Christoph Sep 9 '12 at 22:29
Ok, I just figured out all I need is that .vimrc file with a line that reads syntax on – Christoph Sep 9 '12 at 22:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.