Install create a ~/.vimrc file with the following content: so ~/.vim/.vimrc Syntax vim: https://github.com/nginx/nginx/blob/master/contrib/vim/syntax/nginx.vim To enable syntax manually: :setf nginx or :set syntax=php