For example I have the text login and I want to wrap in in a function call like {{ __('login') }} by just selecting the text and hitting a key combination to perform the change for me, speeding up my work flow.
Is there a way of doing this with PhpStorm/IntelliJ?
Thanks to @LazyOne for providing info; i want to expand according to your question.
your template text will be as following if you want to surround texts like login;
{{ __('$SELECTION$') }}$END$
or if you want surround texts like 'login'
{{ __($SELECTION$) }}$END$
After you finalize your live template by selecting applicable context, it will be ready to use. When you type and select login, then hit cmd + alt + j it will surround.
Another option would be creating a live template which will print everything in the template but you fill login.
{{ __('$NAME$') }}$END$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With