I just finished upgrading a server to Ubuntu 8.04 which came with Vim 7.1 rather than 6.3 on the older server. It seems 7.1 does things slightly differently to 6.3.
In 6.3 I could create ~/.vim/filetype.vim and in there define a line as follows:
au BufRead,BufNewFile *.module,*.install,*.theme setf php
However in 7.1, it looks like a line similar to this has to go into ~/.vimrc instead…
au BufReadPost *.module,*.install,*.theme set syntax=php
This tip took me about half an hour to find… Hopefully it'll help someone else programming Drupal with Vim figure out how to get modules, themes and install files to associate with the PHP filetype (specifically for highlighting).

3 Comments
I have a similar
I have a similar configuration in ~/.vim/filetype.vim and it works fine, but it is slightly different from yours.
Here it is:
Your 7.1 Fix works is 6.3
I pasted your 7.1 fix in .vimrc and it works. vim -version is 6.3. Thanks
thank you.
thank you.
Add new comment