In TextMate one could type php<tab> to insert <?php | ?> (with the | here marking cursor position).
I'm trying to recreate it in VSC like this in the php.json snippets file:
"php tag": {
"prefix": "php",
"body": [
"<?php $1 ?>"
],
"description": "Insert <?php ?>"
}
The problem is that the snippet doesn't show up unless I'm already inside php tags, which kind of defeats the purpose.
Adding the snippet to the HTML file instead does not help.
Is there any way I can make this work the way I want to?