How to turn on git syntax highlighting on vim on a Mac
7,018
I just figured out all I need is to create a ~/.vimrc
file with a line that reads
syntax on
Related videos on Youtube
Author by
Christoph
Updated on September 18, 2022Comments
-
Christoph over 1 year
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 invim
. I'm missing it badly now that I'm on Mac. How can I get it back?-
Admin over 11 yearsthe colors for the
git log
etc do work, yes. I havegit config --global color.ui true
-
Admin over 11 yearsDid you not copy your previous Vim config over?
-
Admin over 11 years
msysgit
seemed 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 :) -
Admin over 11 yearsas a side note, may i introduce you to vim-fugitive ? github.com/tpope/vim-fugitive (see the screencasts on vimcast.org vimcasts.org/episodes/…)
-
Admin over 11 yearsNeed to check it out :)
-
-
Admin over 11 yearsI created the
.vimrc
at~/
with the line that you postet and also created thegitrebase.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? -
Admin over 11 yearsOk, I just figured out all I need is that
.vimrc
file with a line that readssyntax on
-
snowe2010 about 8 yearsyou should mark your answer as correct. It helped me for sure!