Autopopup completion works inside <?php ?> tag but doesn't work outside of it. Is there any fix?

If I type < symbol and then continue typing, autopopup completion works just as intended:

But outside of < tags(either html or php - <a> or <?php  ?>, for example) autopopup completion doesn't work:

In the above example I can still press TAB and it will complete code based on the first code snippet in the list, because it sees all the options, it just doesn't show them to me.

In the case above, in order to show completion options I have to press CTRL+Space after I type p, for example, and then it starts to show completion options:

My settings:

Is this a bug? Or what? Why autopopup completion doesn't work outside of <>? Is there a way to make autopopup completion to always work?

If there is no official way to do this maybe there is a way to automatically trigger Main Menu | Code | Completion | Basic command - as if I press CTRL+Space whenever any character is typed into the editor? 

1 comment
Comment actions Permalink

Hi there,

>Is this a bug?

No. It's expected behaviour.

You are editing PHP file outside of PHP scope. This means that you are in HTML/plain text scope. Try the same in .html file and it will behave the same.

The reason is simple -- I want to type some text, e.g. "PHP v7.2 will be released soon". I see no reason at all why would I need to see a code completion popup for every word in that sentence -- that would annoy a lot (some users get almost mad over much simpler things...).

In PHP context you can type only PHP code/keywords/etc .. so code completion may appear automatically. In HTML you may type HTML tags (which start with "<" after which completion popup appears) or you can type any text. Since there is no way to see if by typing "strong" you mean just a word "strong" or "<strong>" tag .. it's better not to show up that annoying popup for no reason. If you need completion assistance -- invoke it manually with Ctrl+Space.

P.S. For Live Templates/Emmet completion you may use "Code | Insert Live Template..." -- will list only them.

>Is there a way to make autopopup completion to always work?

No (I'm not aware of such option anywhere in IDE settings).

1

Please sign in to leave a comment.