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