htmlidewebstormabbreviation

How do I change the resulting code when hitting exclamation mark + Tab in WebStorm?


So I wanna edit the template that WebStorm throws me when I enter ! and then press Tab. This template is using some bad practices which I don't want to delete every single time I create a new html file.

I've already tried looking into Emmet and Live Templates but neither of these seem to affect the way the exclamation mark shorthand generates the code.

Is this possible in any way?


Solution

  • Standard Emmet abbreviations are implemented using Live Templates in IDEA based IDEs and are located in Settings/Preferences | Editor | Live templates.

    The HTML ones are grouped under the Zen HTML group (the original name of Emmet).

    From WebStorm help page (https://www.jetbrains.com/help/webstorm/using-zen-coding-support.html):

    With WebStorm, you can use native Emmet templates plus more than 200 additional HTML, CSS, and XSL live templates that are listed under the Zen CSS, Zen HTML, and Zen XSL nodes on the Editor | Live Templates page of the IDE settings.

    enter image description here

    You may want to also edit html:5 abbreviation as well since ! is an alias of that one:

    enter image description here