Vim Syntax Highlighting for php-fpm conf files

By default, my vim installation was not recognizing conf files in the php-fpm directory (/etc/php5/fpm in debian) as ini files.

You can change the syntax for any file format by adding these lines to your ~/.vimrc file.

syntax on
autocmd BufRead,BufNewFile /etc/php5/fpm/* set syntax=dosini

Make sure you change the path to match your needs. Available vim syntax options are listed in /usr/share/vim/vimcurrent/syntax


Leave a Reply

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