A quick and dirty fix is to create the missing file with contents:
" Vim syntax support file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 Sep 04
" This file is used for ":syntax on".
" It installs the autocommands and starts highlighting for all buffers.
" If Syntax highlighting appears to be on already, turn it off first, so that
" any leftovers are cleared.
if exists("syntax_on") || exists("syntax_manual")
" Load the Syntax autocommands and set the default methods for highlighting.
" Load the FileType autocommands if not done yet.
let s:did_ft = 1
let s:did_ft = 0
" Set up the connection between FileType and Syntax autocommands.
" This makes the syntax automatically set when the file type is detected.
au! FileType * exe "set syntax=" . expand("<amatch>")
" Execute the syntax autocommands for the each buffer.
" If the filetype wasn't detected yet, do that now.
" Always do the syntaxset autocommands, for buffers where the 'filetype'
" already was set manually (e.g., help buffers).
doautoall syntaxset FileType
doautoall filetypedetect BufRead
which is valid (at the very least) for
vim 7.0 through 7.3, as the file hasn't changed in years.
If you take a closer look, though, it is quite surprising that
vim tries to open
/usr/share/vim/syntax/syntax.vim: I checked the path of
syntax.vim on different OS X versions and this is what I got:
OS X 10.8.3 "Mountain Lion"
Mac OS X 10.5.8 "Leopard"
I'd expect Mac OS X "Snow Leopard" to follow a similar pattern, so why is the path different? What has changed in
vim, have you compiled a newer version or replaced it?
It could also be that
/usr/share/vim/vim<version>/syntax/syntax.vim exists, in which case, as an alternative, you could create a link:
sudo mkdir -p /usr/share/vim/syntax/
sudo ln /usr/share/vim/vim<version>/syntax/syntax.vim /usr/share/vim/syntax/syntax.vim