Is there a way to write integers sequentially per cursor? #8108
-
Title is stupid sorry but couldn't think of a better one. Real quick, if this is my cursor
and I wanted to produce an integer, sequentially, let's say from 1..N at each cursor location such that I end up with
is there a way to do that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use the selection index register |
Beta Was this translation helpful? Give feedback.
You can use the selection index register
#
:"#p
will paste1
for the first selection,2
for the second and so on. You can also use it to increment each selection by their index, so"#<C-a>
will increment the first selection by 1, the second by 2, etc..