I have this custom php snippet
"php": {
"prefix": "php",
"body": [
"<?php $1 ?>"
],
"description": "php tag"
}
What I need to do is, when I press Enter at first placeholder i.e $1, it should add a new line with proper indent.
When I type php and press tab, it would do this
<h1><?php | ?></h1>
where | is cursor position. I need this because sometime I use this tag inside html tags, So I want all code in single line.
But when I need php tag alone, like this
<?php | ?>
And then I press enter key, it should do this
<?php
|
?>