Each time I logged into a webserver and popped open some source file in Vi, I’d get some nice syntax colouring, but I never got it from my local OS X machine.
Well, I finally got fed up enough to figure it out:
1) Open up Terminal.app
2) Navigate to your home directory (if needed – cd ~)
3) Type: vi .vimrc
4) Enter the line: syntax on. Exit and save the document
5) Open up your favorite piece of source code (ie, vi test.php)