Let\'s say I want to type the following in PhpStorm:
$longObjectName->propertyName = \'some value\';
Seems innocent enough, no? If I sta
Well, I solved this problem by recording a Macro and then binding it with a keyboard shortcut:
I chose Ctrl+. as the shortcut and now I am more than happy. :)
You can use autohotkey (http://www.autohotkey.com/) to create new keystrokes and replace PHP Object Operator for period or anything else.
For example, with a script like this:
^.::
Send ->
return
Will replace (ctrl + .) with (->), in anywhere in Windows.
Or
#IfWinActive ahk_class SunAwtFrame
.::
Send ->
return
Will replace . (period) with (->) only in PhpStorm Window (Or others with ahk_class SunAwtFrame). Use Window Spy to see the ahk_class class of any Windows Window.
You can use CTRL + . as . (period)
#IfWinActive ahk_class SunAwtFrame
^.::
Send .
return
1) As far as I remember this kind of completion was asked to be removed for PHP code (too unusual) .. but I cannot find such ticket right now (already spend over 20 mins on this) .. so I could be wrong (it was quite some time ago .. so possibly I'm confused with another code-completion improvement which was hard-configured to behave differently for PHP code only).
Kind of related to "why it was disabled/what problems where there in the past":
In any case: there is an open ticket to actually having it working: http://youtrack.jetbrains.com/issue/WI-21481 (only 1 vote so far).
2) There is no "complete with ->" action available. Related ticket: http://youtrack.jetbrains.com/issue/WI-17658 (star/vote/comment to get notified on progress)