Reputation: 73
How can I make JetBrains write code instead of me?
For example, in WebStorm I can type fori
and press Enter
and this will provide me with a template for a for
loop.
Now I would like to have my own commands for my own code. Is it possible?
Thank you.
Upvotes: 0
Views: 19
Reputation: 165088
It's called "Live Templates".
Yes, you can create your own snippets / override bundled ones: Settings/Preferences | Editor | Live Templates
.
This how-to is made for PhpStorm, but it's the same for all languages/IDEs:
https://confluence.jetbrains.com/display/PhpStorm/Live+Templates+%28Snippets%29+in+PhpStorm
Upvotes: 2