Unless I'm just an idiot (always possible) Eclipse is pretty confused by the new template extensions. I spent an hour or two trying to get things working correctly last night to no avail.
To begin with, the templates weren't getting any syntax highlighting or code assist at all. That turned out to be due to a bug in the Aptana plugin. Upon removing the Aptana plugin (which sucks, because I like its YAML editor, among other things) the files default to the HTML editor, as you'd expect. >From there you can associate the *.php.html content type with the PHP editor, but you can't _disassociate_ it with the HTML editor, and there seems to be some kind of conflict between the two. The files seem to open in the PHP editor, but you only get the functionality and syntax highlighting of the HTML editor. Google searches only came up with methods by which you can hack the Eclipse jar files to try to resolve the conflict between editors. Pretty annoying. Although no one else has mentioned it, I imagine a good percentage of the symfony world uses Eclipse/Zend/Aptana and has either figured it out (and I'm just a dunce) or will be mighty frustrated. I checked TextMate and its HTML syntax highlighting in *.php.html files is fine. I've never attempted to look into PHP code assist in TextMate so I'm not sure how that's effected. I think I remember reading somewhere that Fabpot uses TextMate....maybe if the template names blew up in Mate they'd be named differently :) On Jan 18, 5:03 pm, ryan weaver <[email protected]> wrote: > Hmm, perhaps you're right. I was assuming that this was causing problems in > most or all IDE's, but I just flipped open Geany (a very light editor) and > PHP is highlighting just fine. So, for how many is this really messing up > the code highlighting? > > Ryan Weaver > Lead Programmer - iostudio - Nashville, > TNhttp://www.iostudio.comhttp://www.thatsquality.com > Twitter: @weaverryan > > > > > > > > On Tue, Jan 18, 2011 at 6:42 PM, Tim Nagel <[email protected]> wrote: > > I think it depends on the IDE, but I've been suffering without twig syntax > > highlighting since starting to use SF2. > > > Though, I'm pretty sure my primary editor at work (jEdit) will highlight > > PHP inside html - maybe asking the developers of PHPstorm if its possible? > > > t > > > On Wed, Jan 19, 2011 at 11:34, ryan weaver <[email protected]> wrote: > > >> So, what should I do about my code highlighting in PHPStorm? It's going to > >> be a turn-off for people, it's a turn-off for me. Is it a common option on > >> IDE's to be able to configure them to highlight PHP tags (or Twig tags > >> later) in .html file? > > >> Ryan Weaver > >> Lead Programmer - iostudio - Nashville, TN > >>http://www.iostudio.com > >>http://www.thatsquality.com > >> Twitter: @weaverryan > > >> On Tue, Jan 18, 2011 at 8:21 AM, Jordi Boggiano <[email protected]>wrote: > > >>> On 18.01.2011 11:50, Nils Adermann wrote: > >>> > But wouldn't you want to edit a twig html file in the html editing mode > >>> > and a twig json file in the json editing mode? An old version of the > >>> > project I work on used to have .tpl for the template files and people > >>> > were always confused about how to edit those. Whether they would break > >>> > anything if they edited the html in them. Once we switched to calling > >>> > them .html the file associations were the same by default etc. so it > >>> was > >>> > immediately clear to them that they should treat them as if they were > >>> > regular static html files with some special contents. > > >>> What I see is that this boils down to an issue of educating people vs > >>> educating tools. Given the amount of tools and the friction there to get > >>> support for new highlighting formats, especially funky things like json > >>> with twig mixed in, I'd tend to say you should educate people. > > >>> Cheers > > >>> -- > >>> Jordi Boggiano > >>> @seldaek ::http://seld.be/ > > >>> -- > >>> If you want to report a vulnerability issue on symfony, please send it to > >>> security at symfony-project.com > > >>> You received this message because you are subscribed to the Google > >>> Groups "symfony developers" group. > >>> To post to this group, send email to [email protected] > >>> To unsubscribe from this group, send email to > >>> [email protected]<symfony-devs%2Bunsubscribe@google > >>> groups.com> > >>> For more options, visit this group at > >>>http://groups.google.com/group/symfony-devs?hl=en > > >> -- > >> If you want to report a vulnerability issue on symfony, please send it to > >> security at symfony-project.com > > >> You received this message because you are subscribed to the Google > >> Groups "symfony developers" group. > >> To post to this group, send email to [email protected] > >> To unsubscribe from this group, send email to > >> [email protected]<symfony-devs%2Bunsubscribe@google > >> groups.com> > >> For more options, visit this group at > >>http://groups.google.com/group/symfony-devs?hl=en > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > You received this message because you are subscribed to the Google > > Groups "symfony developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<symfony-devs%2Bunsubscribe@google > > groups.com> > > For more options, visit this group at > >http://groups.google.com/group/symfony-devs?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
