Thursday, June 2, 2011

symfony2 twig plugin eclipse

hi all

all developer search  highlighting for all syntax 
in symfony2 twig template engine is intgreted by default 
but  if you working with eclipse pdt ; twig is not  highlighting
ok twig(symfony world php)=ninja(django world python)
ninja already have a plugin for eclipse and it s very very good for highlighting twig
for use in eclipse
goto : tab Help-> Install new software
you have a new window popup click button add

you have a new popup : in name write any name and in location you must entre this link :
normal click ok

 ok the new window is closed ; and you have in bottum of old window the plugin availible 
check Django Template Editor
and click next and next next .... and accept license ;ok the plugin is intalled ; and if you want restort eclipse pdt

 ok goto  tab Window->Preference->General->File Associations
ok you have this image
in top click add and entre in popup : *.twig
click bottum add : and choose Django Editor
and click ok
ok every file .twig is  highlighting with very nice color and you have autocompelation : click ctrl + space for see all

 you can edit color and templete setting




  1. Great post. +1 from me.
    Do you also know how to get function references to work with Symfony2?
    Eclipse seams to have a problem with namespaces..

  2. noin this time
    eclipse pdt have problem with name space
    but if you using eclipse pdt version of Helios i think The latter(helios) slightly more compatible with namespace in comparison with the old version

  3. Tobias: PDT 3.0 (released with Eclipse Indigo) has full PHP namespace support.

  4. thanks albert for infos
    for installing see this link

  5. in the meanwhile there's a dedicated plugin available with native Symfony2 and Twig support: