0

I use Emmet quite a bit and I use a number of JetBrains products--WebStorm, PHPStorm, and PyCharm.

I frequently run into a problem when I have too long of an Emmet string, particularly one with spaces, the IDE fails to recognize that it's Emmet and won't expand when I hit the expand shortcut (in my case, Tab).

I'm looking for the following functionality: Take the current selection (or line, if no selection) and expand using Emmet.

Is there a built-in shortcut that I'm missing that does this? If not, how can I write a macro to do this? I can't find any "expand selection using Emmet" command.

jdotjdot
  • 16,134
  • 13
  • 66
  • 118

1 Answers1

1

There's no such feature to treat selection as Emmet snippet.

I think the fastest way in your case would be to cut the line, then paste it and press TAB.

But I do not think it will work as you expect if the line contains spaces.

You can try recording a simple macro (Edit->Macros from main menu).

But it's also interesting to see an example of the line you want to have expanded. Where does the line come from? Maybe it makes more sense to create a separate own live template for them?

Topka
  • 2,001
  • 16
  • 13