How to turn on git syntax highlighting on vim on a Mac
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?
I just figured out all I need is to create a ~/.vimrc file with a line that reads syntax on
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: http://code.google.com/p/vim/source/browse/runtime/syntax/gitrebase.vim