Entry
How can I make a .php vi syntax file work for .phtml files too?
Jul 14th, 1999 10:26
n, Nathan Wallace,
If you are using http://www.vim.org on linux
1. edit the syntax.vim file
:e $VIM/syntax/syntax.vim
2. look for the php syntax extensions
/php
3. add the .phtml type to that line so it looks something like:
au BufNewFile,BufRead *.php3,*.inc,*.php,*.phtml so
$VIM/syntax/php3.vim
You might have to do that stuff as root depending on who you installed
vim as.
If you're using some nonstandard extension, and you find that this
doesn't work, check the rest of the file. It's possible that another
language is using the same extension and thereby trampling your change.