0

I bought the Pro Version of PyCharm (2016.3.2).

How can I activate the autopopup suggestion list for autocompletion for html-snippets?

It is working for all other file types like .py .js. and .css but not in .html files.

I have to press CMD+J or TAB to get the list, but I want it to popup with typing the first character like with the other files.

Preferences are setup correct I think:

Settings: Code Completion

Especially I would like to show up my own Live-Templates. Who can give an advice?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
qfactor
  • 27
  • 9

1 Answers1

0

This behaviour is correct for HTML/XML context.

Imagine this HTML code:

<p>a</p>

How IDE should know for sure what are you about to type here (after typing initial a letter):

  • maybe it will be word apple?
  • or maybe a dog?
  • or maybe you actually want enter <a> tag here?

If code completion would popup here .. I would abandon such IDE straight away -- otherwise how I suppose to type plain text here .. considering that I will see popup window almost all the time?

So...

  • if you wish to see code completion at this point (plain text context) you will have to invoke code completion popup manually by pressing Ctrl + Space (or whatever you have there for Code | Completion | Basic) after typing a.
  • for list of Live Templates alone, pressing Cmd + J (Code | Insert Live Template) is required.
  • for quicker Live Template/Emmet invocation (if you know exact Live Template abbreviation) -- just press expand key (Tab by default in most OS/Keymaps) .. so a[Tab] will convert that into desired <a href=""></a> expanded text.
LazyOne
  • 158,824
  • 45
  • 388
  • 391