Frage

In PHPSTORM when I type .classname or #id and hit TAB I got

<div class="classname"></div>

BUT I want it to be:

<div class="classname"></div><!-- .classname -->
War es hilfreich?

Lösung

In original Emmet you can use |c filter to produce automatic comments: http://docs.emmet.io/filters/#comment-tags-c

But I don‘t know if this feature is supported by PhpStorm since it uses its own Emmet implementation.

Andere Tipps

You can also go to Settings|Emmet|Filters enabled by default: Comment tags=true, if you dont want to type |c each time.

As Lewis mentioned, there's a preference that can be set for this. In PhpStorm 2017.3 it can be found under Settings > Editor > Emmet > HTML > Filters enabled by default. See screnshot below. enter image description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top