Looks like the HTML templates don't work on PHP tags, but I think they should because they are part of the HTML. You can also notice that the IDE indents them the same way it indents HTML tags.
If it is about “Surround with <tag></tag>” Live Template, you can try extending the context to the PHP in the “Settings/Preferences > Live Templates” settings section:
I have quickly tried it, and it seems to be working:
Looks like the HTML templates don't work on PHP tags, but I think they should because they are part of the HTML. You can also notice that the IDE indents them the same way it indents HTML tags.
Hi,
If it is about “Surround with <tag></tag>” Live Template, you can try extending the context to the PHP in the “Settings/Preferences > Live Templates” settings section:
I have quickly tried it, and it seems to be working:
Thanks, look's like you can only check Other — making it less likely for the template to be suggested in the wrong context.
What's this?
Looks like you need this checked as well if you want the template to work around <?= … ?> tags.
Cool, thank you for the update!
Honestly, I have no idea what this exact setting is designed for. In my case, it works fine with the “PHP > Other” context alone.
Does it also work for <?= … ?> tags – that is, without also checking the “live.template.name…” option?
It does for me, at least on a pretty simple example: