More verbose PHP autocomplete?

I wanted to give PhpStorm another try (after years). Wasn't happy to see the registration to the forum isn't working correctly (don't know if admins are here, but you need to look at this).

Anyway, I was wondering about the autocomplete. For example if I type swi… autocomplete returns switch () (or other if () or foreach () …)

I've read all good about PhpStorm's autocomplete, but this seems quite unhelpful. I can write those 3 characters as well. I would assume I get something like

switch ($variable) {
case 'value':
# code...
break;

default:
# code...
break;
}

3 comments
Comment actions Permalink

That would be unexpected for most users, but we have Live Templates, and you can add whatever output you want to certain symbols combinations. Please take a look: https://www.jetbrains.com/help/phpstorm/using-live-templates.html

1
Comment actions Permalink

Thanks. Didn't know it is called Live Templates. Have made some snippets.

0
Comment actions Permalink

You also try Postfix Completion (JavaScript has a predefined "switch" you can adapt) though it isn't as intuitive as live templates.

0

Please sign in to leave a comment.