Marius Roets wrote:
> Hi everybody,
> 
> I position the cursor on 01 and press F7, this works fine up to 08.
> For 08, 09 and 10, the leading zero dissapears.
> :nmap <F7> <C-A>j
> Use the same unmodified list.
> This is even weirder. 07 becomes 010, 08 becomes 9, and the rest seems ok.


I think the reason is that vim interprets numbers with a leading 0 as
octal numbers. Thus the number after 07 is 010 which is 8 in decimal
representation.

You can change the behavior to the one you expected by
:se nrformats-=octal

See also
:he nrformats
:he Ctrl-A


HTH,
Christian

Reply via email to