Vim: Vim Syntax highlighting for Apache – CentOS 6.*

I often have edit apache configuration files on servers. Syntax – Highlighting never ‘auto-starts’. I found out why in some cases. Of course – if place of files is non usually.

For example:


[root@server vhosts]# egrep -A 3 'Apache config'  /usr/share/vim/vim72/filetype.vim
" Apache config file
au BufNewFile,BufRead .htaccess                  setf apache
au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,apache.conf*,
apache2.conf*,/etc/httpd/conf.d/*.conf*,
/etc/httpd/vhosts/*.conf*
,auth_mysql.conf*,auth_pgsql.conf*,ssl.conf*,perl.conf*,php.conf*,
python.conf*,squirrelmail.conf* call s:StarSetf('apache')

[root@server vhosts]# 


Leave a Reply

Your email address will not be published. Required fields are marked *

*

Scroll to top