I find myself doing this over and over again. It can be pretty time consuming. What options are available for this?
Select all text ( Cmd + A on Mac, Ctrl + A elsewhere), then use the shortcut to “split the selection into lines” ( Cmd + Shift + L on Mac, Ctrl + Shift + L elsewhere). Both commands are also available from the command palette.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With