Question

In HTML pages, I found myself many times writing long lists like this:

<ul>
<li><img src="/images/image-1.jpg" /></li>
<li><img src="/images/image-2.jpg" /></li>
...
<li><img src="/images/image-30.jpg" /></li>
</ul>

Is there a way to make PHPStorm to create this lists? I checked live templates but could not find a way to make this work.

BTW, I know you can use PHP or JavaScript

Was it helpful?

Solution

Is there a way to make PHPStorm to create this lists?

Yes -- PhpStorm supports Emmet (expanding abbreviations) -- just use it.

Documentation: http://docs.emmet.io/abbreviations/syntax/

Example abbreviation (for your case):

ul>li*30>img[src="/images/image-$.jpg"]

Just type it (or Copy+Paste) and press TAB (or whatever else expansion key you may set in Settings | Emmet).

OTHER TIPS

You can use Emmet in phpStorm to achieve this.

Overview - General Emmet Docs

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