When working with HTML ids it is often necessary to create elements with same id names, but different numeric index, for example:
<ul>
<li id="item-|"></li>
<li id="item-|"></li>
<li id="item-|"></li>
<li id="item-|"></li>
<li id="item-|"></li>
</ul>
"|" - represents one of the multiple cursors. Is there a way to paste numbers from 1-5 there?
You can use the String Manipulation plugin.
To generate numbers in sequence at the multiple carets:
Type in the number to start the sequence with, say 1
, and then select the number.
Open the String Manipulation menu. This is done by
In the menu, choose Increment/Decrement → Create sequence.
Here's an animated screenshot: Screenshot is based on PhpStorm 2016.2 and String Manipulation 5.0.135.445.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With