Completing Statements via Smart Enter Code Completion Failing

I'm learning PHPStorm, so hopefully I'm just missing something here.

I'm having trouble getting PHPStore to auto-complete the code constructs of basic PHP statements.

For example, in a PHP document, if I type "swit", the code completion suggestion popup appears, and "switch" is the first option. The background is blue. If I select the "switch" option by hitting return or enter or by clicking the option in the popup, it simply completes the word "switch" in my document, but makes no attempt to complete the full PHP switch() statement code construct.

If, while the suggestion popup is displayed, I hit the Ctrl+Shift+Enter key combination, the suggestion popup disappears, and a pink-background popup appears in its place that says "No suggestions".

The same happens for all basic PHP logic statements that I've attempted, including "if", "for", "foreach", and "while".

APPLICABLE FACTS:
Auto-completion of most built-in PHP functions I've tried, such as date(), header(), array_key_exists(), array_merge(), etc., work fine, with the exception of require_once(), which results in the same behavior as described above.
The auto-completion suggestion popup appears very quickly. I originally set the Autopopup in (ms) setting to 1000 to make it pop up more quickly. Now, however, if I change that value to a large value like 15000, it still pops up almost instantly.
PHPStorm version is 7.1.3.
Operating system: Mac OS X Mountain Lion 10.8.5.
It will auto-complete references to existing custom functions correctly, completing the function name, adding the parenthesis, and providing the parameter hints.
I'm not aware of any issues with my keyboard or any other keyboard-related shortcuts in PHPStorm or any other applications.
I seem to recall this functionality working for me at some point in my early learning.
I've invalidated the caches and restarted PHPStorm, per some other forum suggestions.

Thanks, Fritz

3 comments
Comment actions Permalink

Hi there,

I originally set the Autopopup in (ms) setting to 1000 to make it pop up more quickly. Now, however, if I change that value to a large value like 15000, it still pops up almost instantly.

I suggest to triple check what setting you are changing .. as auto-complete popup delay has been removed in v7. Now it's either automatic or needs to be invoked manually.

The same happens for all basic PHP logic statements that I've attempted, including "if", "for", "foreach", and "while".

These are language constracts (same as empty(),  isset() etc) -- IDE does not add any braces etc for it -- it just completes the word itself. It has always been like that (WI-3232, WI-6223, WI-22044 etc -- just search for "language construct" and you should find few related tickets).

What you may have used -- is Live Templates (there are few predefined ones for PHP; only few unfortunately -- I have defined more than twice as much for myself).

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

If, while the suggestion popup is displayed, I hit the Ctrl+Shift+Enter key combination, the suggestion popup disappears, and a pink-background popup appears in its place that says "No suggestions".

Ctrl+Shift+Enter is shortcut for Complete Current Statement (at least here on Windows). In v8 it completes switch, if, while & foreach (I've only checked those) from code completion popup. In v7 only some of them work like that.

0
Comment actions Permalink

Thanks Andriy,

With regards to the auto popup delay, this is the setting I was referring to:

http://screencast.com/t/0j5zr5oX6Qn

If that's not the auto popup delay, what is it?

Thanks! Fritz

0
Comment actions Permalink

With regards to the auto popup delay, this is the setting I was referring to:

http://screencast.com/t/0j5zr5oX6Qn

If that's not the auto popup delay, what is it?

Is it autopoup delay -- no doubts here.

But -- autopopup for WHAT? Did you checked that "small nuance"?

It's not code completion popup -- it's for different related feature. You should see it from your screenshot.

0

Please sign in to leave a comment.