Search code examples
phpphpstormemmet

How use Emmet in PHPStorm in PHP files?


Emmet only works in HTML & CSS files How can I use it in PHP files in the IDEs like PHPStorm?

<?php echo "p>li*5"; ?>

Solution

  • In PHPStorm, you can just type echo "p>li*5" and then make sure your cursor is still inside the quotes and it is at the end of your Emmet string. Hit Alt + Enter, then select Inject Language / Reference. You will get a list of languages and you can filter by typing. Select html and tab completion will work just as in an HTML file.