最近裝的兩台CentOS在vim nginx時,語法都沒有顏色,看的很辛苦
爬了下文,參照這兩個連結,得到解決
https://gist.github.com/ralavay/c4c7750795ccfd72c2db
https://www.centos.bz/2017/07/vim-nginx-conf-syntax-highlight/

wget http://www.vim.org/scripts/download_script.php?src_id=14376 -O nginx.vim
cp nginx.vim /usr/share/vim/vim74/syntax/
vim /usr/share/vim/vim74/filetype.vim
au BufRead,BufNewFile /etc/nginx/*,/etc/nginx/conf.d/*,/usr/local/etc/nginx/* if &ft == '' | setfiletype nginx | endif