Question

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 -->
Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top