/IncrementSelection

Add a number to each selection in Sublime Text, incremented once per selection

Primary LanguagePython

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 of this question on stackoverflow. Usage is in Riccardo Marotti's answer. The default hotkey is ctrl + alt + i.

Examples

Tips: [] stand for a selection, | stand 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|

[#] line 27 -> 27| line 27
[#] line 28 -> 28| line 28