Twig Shoertcuts?

Been using PHP Storm with Symfony 2 - great product - actually bought it I like it so much :-) Cannot recall the last time I paid for an IDE for PHP.

I've been using the Symfony2 plugin. My fingers are bleeding from constantly typing {% trans %} {% endtrans %}

Is there a way to make this a "hot key" insert thing? Is that a "snippet"? I didn't see a way to makea  snippet a hotkey...like "command-t" or something like that.

Any suggestion woudl be great.

beren

4 comments

Hi there,

PhpStorm/WebStorm has functionality called Live Templates (Settings | Live Templates) -- you should be able to use it for your needs in twig files just fine (have not used myself since I do not use twig templates)

http://blog.jetbrains.com/webide/2012/10/high-speed-coding-with-custom-live-templates/

0

Pretty darn cool!

Is there a way to create a new grouping for "twig" and then export all my shortcuts for the other developers in my team?

beren

0
Is there a way to create a new grouping for "twig"

Right click ?

export all my shortcuts for the other developers in my team?

"File | Export Settings..." and then "File | Import Settings..." on another computer ? But this will be applied to ALL live templates.

.... or manually when IDE is closed. Each group is saved in separate file, so you can copy only desired ones. On Windows 7 it would be in C:\Users\USERNAME\.WebIde60\config\templates\ folder

0

Please sign in to leave a comment.