I tried several editors, TextMate, Coda2, PHPStorm. None of them supports such an exotic combo.

I usually use a trick by adding a HAML comment with PHP opening tag at the beginning:


That works OK in simple editors and with simple HAML code, but not in PhpStorm unfortunately. PHP Storm has the temporary inject language functionality that I’ve been using, but this is far from ideal as has to be repeated every.

PhpStorm, HAML file with temporary injected PHP:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.