I find myself doing this over and over again. It can be pretty time consuming. What options are available for this?
4 Answers
The Increment Selection package might be what you're looking for. It seems to be working with multiple cursors, so should be pretty close to your use case:
Select a block of text and hit ctrl-shift-i to replace it with incrementing numbers
- Uses first line's number if any
- Works with multiple cursors
for those who google this feature for VS CODE editor and end up here (like me), here is vscode plugin. Thank you anyway for getting name of the feature here 😊👍
There are a few others available now too. Increment Selection hasn't been touched in 2 years.
Newest and most robust seems to be: https://atom.io/packages/multi-cursor-increment
It can set things to incremental numbers and even move everything up or down by 1 afterwards.
Another option: https://atom.io/packages/increment-me
ctrl-alt-n
, and numbers are inserted from 0 and up. if want a more customised insertion,ctrl-alt-0
will open up a dialog box, where you type inM:N
, whereM
is the number to start counting from, andN
is the increment value. For example1:2
will insert positive odd numbers. atom.io/packages/multiple-cursors-functions