Emmet conflicts with Live Template Tab Cycle

When I hit the Tab key after typing a value for a Live Template variable, instead of cycling to the next variable position, Emmet expands this value as if it is an HTML tag.

For example, when I use the "!" Live Template that generate the HTML boilerplate I have the option to type out a value for the title (i.e. <title></title>). After typing anything (e.g. "Test") and pressing Tab, I expect the cursor to jump to the next Live Template variable, however instead Emmet kicks in and a tag appears (e.g. <Test></Test>) and the cursor doesn't move to the next Live Template variable as expected.

The only solution I found is to disable Emmet, however this implies that I can't use Emmet.

Is there a solution for this?

0
6 comments

Are you using the Emmet plugin? Does it help to disable it? 

I can't reproduce the issue without the plugin, so if it holds true for you as well, I suggest contacting plugin's vendor, as it's third-party.

P.S. I only found this Emmet plugin: https://plugins.jetbrains.com/plugin/7450-emmet-everywhere

And it wasn't updated since 2015

0

Andrey Resler

I am not using the Emmet plugin. As far as I know I don't have an Emmet plugin installed. I am using the Emmet functionality that came with PyCharm (I am using PyCharm 2020.1.1 Professional Edition).

0

Please do not use Tab to jump to next field when expanding live templates - Enter will stop editing current variable value and move cursor to next one.

1

Elena Pogorelova

I wasn't aware that I could use Enter to move the cursor to the next variable. I was using Tab after reading about it in the documentation.

Enter works well, and it's an OK work-around. Thanks!

Though is there a way to use Tab while preventing Emmet getting in the way? I find Tab more natural since it is already used by default for Live Template expansion and is a well known key for jumping to the next field (I also find it a bit more comfortable since you can use Tab to go to the next variable and Shift+Tab to go to the previous variable).

 

0

>Though is there a way to use Tab while preventing Emmet getting in the way?

you can try changing the default key used for Emmet expansion in Settings | Editor | Emmet, Expand Emmet Abbreviation With

1

Elena Pogorelova

That works well! Thanks for the suggestions!

0

Please sign in to leave a comment.