Live Template custom Expressions
From my research i am not seeing it as a possiblity to create a custom expression in the live templates. I recently changed from netbeans to PhpStorm and love it. however i have gotten used to certain live templates and want to mimic them in PhpStorm. The one that i use most often in my live templates is "variableFromPreviousAssignment" Is there a possibilty to create this functionality in PhpStorm? If so how do i create the custom expression.
请先登录再写评论。
Hi there,
Unfortunately you cannot create your own expression just like that -- AFAIK it has to be done as a plugin (which means coding in Java).
As for your particular experssion: https://youtrack.jetbrains.com/issue/WI-6627 -- watch that ticket (star/vote/comment) to get notified on progress. ATM it is not planned to be implemented any time soon ("Fix Version: Backlog")
there is no such live template function in PHPStorm. Please vote for https://youtrack.jetbrains.com/issue/WI-6627.
Intelij IDEA allows creating custom template functions using groovyScript('groovyCode') function, but in PHPStorm/WebStorm you can only use predefined macros (https://www.jetbrains.com/phpstorm/help/live-templates-2.html#d544918e466). See https://youtrack.jetbrains.com/issue/WEB-11806