Unfortunately the vi that ships with Mac OS X doesn’t have an optimized configuration file to allow for syntax highlighting
To enable the syntaxx highlighting do
cd /usr/share/vimÂ
sudo vim vimrc
and add
syntax on ” syntax highlighting
Thats all.