views:

74

answers:

2

Hello i am using vim and snipMate i very times i need to name the html files to php, just because 1 or 2 lines of code.

I every time i create an php file no introduce html and i have to activate the html snippets manually with the command

set ft=php.html

I intend to activate it automatically in this this line on my vimrc

autocmd BufREad, BufNewFile *.php set ft=php.html

Is this correct? I am missing anything or is something wrong?

Thanks already.

+5  A: 

You will need to make it two separate directives.

au BufRead *.php set ft=php.html
au BufNewFile *.php set ft=php.html
sleepynate
This worked for me!
Andrew
A: 

You have an uppercase E in your example. The following should work on one line:

au BufRead,BufNewFile *.php set ft=php.html
butayni