Bram Moolenaar wrote:
>
> I don't know about the use of PHP in .phtml files. I thought they were
> always called *.php. Opinions?
>
> I don't delete an existing syntax file unless it is completely useless.
I believe ".php" is the most recognised extension, but historically
".phtml", ".php3" and ".php4" have been used as well. PHP 5.2, the
current version, usually uses ".php" but ".phtml" is associated with it too.
Vim presently has one syntax file for PHP 3 and up, and a separate one
for PHP 2. This separation feels odd to me, the effect is that opening
a PHP 5 ".phtml" file gives you partial highlighting. I would suggest a
filetype.vim change from:
" Php, php3, php4, etc.
au BufNewFile,BufRead *.php,*.php\d setf php
" Phtml
au BufNewFile,BufRead *.phtml setf phtml
... to:
" Php, php3, php4, etc.
au BufNewFile,BufRead *.php,*.phtml,*.php\d setf php
I wouldn't normally suggest deleting an existing syntax file, but I'd be
really surprised to see anyone wanting to use it. (The last change date
inside the file (11 May 2003) is much more recent than I'd expect, though.)
There's a huge amount of source code for PHP 4.x applications inside
organisations and around the Web, but I wouldn't expect to see anything
earlier[1]. Even PHP 4 has had an official "end of life" announcement,
with PHP 5 considered mature and PHP 6 expected in 2008.
Thanks,
Dave
[1] If you look hard enough you can still find URLs ending in ".php3"
on the WWW, but HTTP headers often vouch that they're running a
later version of the interpreter.
--
Save the whales. Collect the whole set.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---