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

前端 未结 3 905
情话喂你
情话喂你 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条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-07 07:35

    You want to had a number at each row that you have selected, but not the same. For exemple, you select 5 cursors and you want to write 1 2 3 4 5.

    select your 5 cursors

    ctrl + maj + P and select arithmetic

    Because you have 5 cursors, it propose 1 2 3 4 5

    If you want you can change your number of iteration

    Or start from an other number than 1

    Add odd number

提交回复
热议问题