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:
- Create a new .tpl file (or just write the needed template code in an existing .tpl file).
- Select the lines of code you need as template.
- Go to Tools->Save as Live Template... (NOT Save File as Template...).
- 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
精彩评论