Macro on php tags


#1

How do I create a macro or however it is called in the atom speak to automatically insert the following snippet:

<?php | ?>

The I sign indicates the position of the cursor after running the macro.

Thank you


#2

You want a snippet. Something like this.

".source.php":
  'PHP Tags':
    prefix: 'php'
    body: '<?php $0 ?>'

However, it looks like language-php already includes a couple of snippets along those lines, so maybe you should try those first