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

前端 未结 3 901
情话喂你
情话喂你 2020-12-07 07:01

Is there a way to add insert a number that is incremented once per cursor in Sublime Text 2?

Example, with | as the cursor:

Lorem ipsum          


        
3条回答
  •  Happy的楠姐
    2020-12-07 07:12

    I recommend the plugin Text Pastry. The Number Sequence command is the one you need.

    I prefer to use the Insert Nums command:

    Text Pastry has a build in support for the Insert Nums syntax by providing three numbers separated by one space:

    N M P

    N: the start index.

    M represents the step size which will be added to the index for each selection.

    P must be > 0 and will be used to pad the index with leading zeroes.

提交回复
热议问题