开发者

Can PHP and HTML code assist happen in the same file?

I'm attempting to use Aptana for some web programming. For the most part, I'm impressed! One thing that's driving me crazy is that Aptana won't perform code assist on PHP code in an .html file... and conversely, won't perform HTML code assist in a .php file?!

Am I missing something here? Pushing "best practices" aside for a moment... PHP and HTML can live harmoniously in a single file. So how do I edit both languages in that same file?!

P.S. I've been using CODA, which has its equivalent called Syntax Mode. You can choose PHP-HTML... which is exactly what 开发者_开发技巧I need in Aptana!


I'm also using Aptana or to be more precisely: Eclipse 3.4.2 + Aptana 1.5 + Aptana PHP Plugin. In my PHP files I do have HTML code assist. Make sure that in Window->Preferences->General->Editors->File Associations you have the Aptana PHP editor as the default editor for .php files.

But it is true, that you don't have PHP code assist within HTML files by default. So the easiest way to get this is also chosing the Aptana PHP editor for .html files.


Aptana Studio 3 does all HTML/JS/CSS/PHP code assists in php files. By default, html files will not include PHP code assist unless you associate html files with PHP editor.

Regards, Max


I've been using Sublime Text 2 recently. It will do code completion help/syntax highlighting for both PHP and HTML in the same file.

It's a free, endless trial for Windows/Mac/Linux. After a few weeks, though, I loved it enough to pay for the license.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜