HTML lives templates not working in Pycharm (but Python templates do)

Hey,

I'm using live templates in Python with Pycharm and they work fine. I'm trying to enable some for HTML but I can't seem to get it to work:

 

And yes the context is set:

 

And the page an HTML file created by Pycharm using it's context menu:



Nothing is proposed. But I'm clearly in an HTML file, so in the right context, and I'm typing the beginning of a template abbreviation? What am I missing?

In fact, the html auto-complete doesn't seem great:


Doesn't produce <div></div> but only auto-completes the word "div" to <div

Is the issue with my auto-complete setup?

 

 

1
1 comment

>Nothing is proposed. But I'm clearly in an HTML file, so in the right context, and I'm typing the beginning of a template abbreviation? What am I missing?

try hitting Ctrl+Space - can you see your template in completion? Snippets are not auto-completed in HTML, as it's not clear if you are entering a snippet or a plain text.  Showing auto-completion when you just type some text would be very annoying.

See also https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000719050-Autopopup-completion-works-inside-php-tag-but-doesn-t-work-outside-of-it-Is-there-any-fix-

>Doesn't produce <div></div> but only auto-completes the word "div" to <div


choosing tag name from completion doesn't apply a live template; you can enter tag name and hit Tab to have it expanded with Emmet, the IDE supports basic abbreviations as well as expanding sequences.

 

0

Please sign in to leave a comment.