X
X
XenK2015-04-03 14:28:04
HTML
XenK, 2015-04-03 14:28:04

How to automatically do attribute numbering in Sublime Text 3?

For example, there are many lines:

<a id="1" href="">text</a>
<a id="2" href="">text</a>
<a id="3" href="">text</a>
<a id="4" href="">text</a>
<a id="5" href="">text</a>
<a id="6" href="">text</a>
<a id="7" href="">text</a>
<a id="8" href="">text</a>
<a id="9" href="">text</a>
<a id="10" href="">text</a>
...

The ID should be automatically numbered. Are there any hotkeys, plugins?
a[id=$]{text}*10
I also wanted to note that such a code for Emmet will not work, since you need to number the already created ones.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gran Torino, 2017-07-15
@adrin13

install the Increment Selection plugin
highlight your id and press “ctrl” + “alt” + “i”
rricketts.com/add-auto-incrementing-number-selecti...

A
Anton Yatsenyuk, 2015-04-09
@spamforhope

Created elements cannot be edited in this way. Only create a new one with the snippet that you specified.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question