linux(centos)下配置nginx配置文件nginx.conf显示语法高亮


首先需要切换到nginx源码安装包文件地址:

# cd /usr/local/src/nginx/nginx-1.18.0

# ls

auto   CHANGES     CHANGES.ru     conf     configure      contrib     html      LICENSE     Makefile    man   objs   README   src

# cd contrib/vim 

ftdetect ftplugin indent syntax

需要把这vim下的这几个文件夹复制vimfiles下:

# cp  -r ./*  /usr/share/vim/vimfiles

至此,nginx配置文件nginx.conf语法高亮已经配置完成.