0

I just started using WebStorm. Emmet is working perfectly with .html files, but not with .php files. Any fix for that?

Problem: writing .container + clicking on Tab should give <div class="container"></div>, but it's not doing that in PHP files. In HTML files it's working perfectly.

LazyOne
  • 158,824
  • 45
  • 388
  • 391

1 Answers1

2

In WebStorm, .php files are simple text files highlighted using textmate bundles; HTML language is not injected there, so advanced HTML features do not work.

As a workaround, you can try modifying Zen HTML live templates context in Settings | Editor | Live Templates by appending Other to it, like:

enter image description here

but this has to be done for each template separately

lena
  • 90,154
  • 11
  • 145
  • 150