php-awesome-snippets icon indicating copy to clipboard operation
php-awesome-snippets copied to clipboard

Tip: PHP controls inside html

Open carlosleonam opened this issue 6 years ago • 1 comments
trafficstars

I need to use php controls extensively inside html files (but with php extension). I created some snippets, cloning ** "control.json" ** to ** "tag, php.json" ** to fit my need, and adding ** "packages.json" ** to act as source html code.

I share the gist below for anyone who needs it.

PHP snippets to use in VS code ( with extension PHP Awesome Snippets )

carlosleonam avatar Aug 27 '19 12:08 carlosleonam

Hi, Thanks @carlosleonam for this work ! Pretty useful for people that don't use a template language/engine.

To add these specific snippets (and persist them over update) :

  • Edit User Snippets under File > Preferences (Code > Preferences on macOS),
  • Copy this gist's content under the specific VS Code context (HTML in this case)
  • Snippets are now available in HTML context
  • Enjoy coding !!!

h4kst3r avatar Sep 12 '19 09:09 h4kst3r