text text text text
after the editing, those text becomes to
1 text 2 text 3 text 4 text
It's easy in Notepad ++ with the Column Editor, but I don't know how to do the same in Sublime Text 2.
Just select the text, split the selection ( ctrl+shift+l ), insert and select $ at the start of the line, and evaluate python ( ctrl+shift+x ) to get increasing numbers.
The Text Pastry plugin does the job very well. It offers the Insert Numbers Syntax.
Select multiple lines with CMD+SHIFT+L (Sublime default):
text| text| text| text|
Move the cursor where you want it:
| text | text | text | text
And insert numbers with Text Pastry by hitting CMD+ALT+N and entering 1 space 1 space 0:
1| text 2| text 3| text 4| text
Where 1 space 1 space 0 stands for:
Replace CMD with CTRL on Windows or Linux machines.
copy of this post https://stackoverflow.com/a/64083371/5902698
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 (maybe you can use the shortcut ctrl + shift + L)
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 step of iteration
Or start from an other number than 1
Add even numbers
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