The increment function takes a leading number, similar to most vim commands. 1000 ctrl+a will return 2234 as you wish. If all of your numbers are 4 digits, this will work. Or you can use r2 , which replaces the current character under the cursor with 2 , but that might be too specific.
If you need a script, you can write a macro.
qaa[space][esc]h[ctrl+a]lx
broken:
qa - start recording a macro q and save for registration a
a[space][esc] - add a space after the number
h - return to number
ctrl+a - add one
lx move right and remove the space.
You do not need to add a leading space, because, as you noticed, the ctrl+a function acts on the number as a whole and will always add 1.
Brombomb
source share