Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 720
Sam Avatar asked Aug 10 '10 01:08

Sam


1 Answers

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.

like image 175
2ndkauboy Avatar answered Nov 02 '22 06:11

2ndkauboy