开发者

How to enable zencoding support in smarty templates with PhpStorm

开发者 https://www.devze.com 2023-02-13 07:41 出处:网络
How do you enable th开发者_高级运维e ZenCoding \"live templates\" in .tpl smarty templates in Jetbrains PhpStorm? It works flawlessly in .php and .html files but not in .tpl files.In \'Add Live Templa

How do you enable th开发者_高级运维e ZenCoding "live templates" in .tpl smarty templates in Jetbrains PhpStorm? It works flawlessly in .php and .html files but not in .tpl files.


In 'Add Live Template' dialog , select 'other' radio button.


I know this is a very old question but I just kinda stumbled upon it having the same lately. What I did was:

  1. Create a new .tpl file (or just write the needed template code in an existing .tpl file).
  2. Select the lines of code you need as template.
  3. Go to Tools->Save as Live Template... (NOT Save File as Template...).
  4. Add an Abbreviation and a Description and/or any Variables that you need.
    (use the $SELECTION$ variable if you need to surround a selection or $END$ if you need the pointer somewhere specific)

more info about Live Templates here: Live Templates
& about variables here: variables

0

精彩评论

暂无评论...
验证码 换一张
取 消