Mac – How to update PHP syntax file for vim

macvim

I notice the syntax file for PHP for vim is quite out-dated.
Does anyone know where is these syntax file located in Mac so I can do the upgrade?

Best Answer

Solved myself,
here are the steps :-

  1. locate vim | grep php
  2. turn up is this file /usr/share/vim/vim73/syntax/php.vim
  3. sudo mv /usr/share/vim/vim73/syntax/php.vim /usr/share/vim/vim73/autoload/phpcomplete.vim.orig as backup
  4. download latest php vim file from http://www.vim.org
  5. untar the tarball
  6. copy the php.vim to /usr/share/vim/vim73/syntax/php.vim