Increment Selection
Add a number to each selection in Sublime Text, incremented once per selection
Details
Installs
- Total 55K
- Win 29K
- Mac 17K
- Linux 8K
| Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | May 17 | May 16 | May 15 | May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 1 | 1 | 3 | 3 | 1 | 0 | 2 | 1 | 2 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 4 | 2 | 0 | 2 | 0 | 1 | 1 | 5 | 3 | 2 | 3 | 0 | 1 | 0 | 1 | 4 | 3 | 2 | 0 | 2 | 4 | 1 | 2 | 3 |
| Mac | 0 | 1 | 1 | 2 | 4 | 1 | 0 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 5 | 1 | 0 | 2 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 2 | 0 | 0 | 1 | 1 | 1 | 1 |
| Linux | 0 | 0 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 1 | 0 | 0 | 1 | 2 | 1 | 2 | 2 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 1 | 0 | 1 | 2 |
Readme
- Source
- raw.githubusercontent.com
Increment Selection
Add a number to each selection in Sublime Text, incremented once per selection. You may also insert the number of line containing the selection by using the '#' symbol.
This plugin is based on Riccardo Marotti's answer on StackOverflow. The default hotkey is ctrl alt i or cmd ctrl i.
Usage
Place the cursors where you need:

Insert the number the counter should start from (in this case 1):

Select the number you typed (shift <—):

Type the shortcut:

Examples
Tips: [] stands for a selection, | stands for a caret.
[1] text [1] text [1] -> 1| text 2| text 3|
[a] text [a] text [a] -> a| text b| text c|
[A] text [A] text [A] -> A| text B| text C|
[01] text [01] text [01] -> 01| text 02| text 03|
[05,2] text [05,2] text [05,2] -> 05| text 07| text 09|
[5,-1] text [5,-1] text [5,-1] -> 5| text 4| text 3|
[a,3] text [a,3] text [a,3] -> a| text d| text g|
Increment follows the difference between the first and second element:
[10] text [9] text [1] -> 10| text 9| text 8|
[a] text [c] text [a] -> a| text c| text e|
Generate line numbers:
[#] line -> 1| line
[#] line -> 2| line
[#] line -> 3| line
[#] line -> 4| line
[#] line -> 5| line