Pergunta

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 -->
Foi útil?

Solução

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.

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top