7
2
I'm trying to write a long XML catalog using vim macros to write all the repetitive stuff. I've found it's useful to write a macro yanking the previous entry, then going through each item and incrementing it with Ctrl+A. Vim does OK with incrementing 001 to 002, all the way through 007, but then it increments 007 to 010! Also, bizarrely, it increments 008 to 9, taking out the leading zeros.
Does anyone know what is causing this bizarre bug, and how to fix it?
When I tried putting this in .vimrc it didn't do anything. If I type it into the live session with ':' it works but then ctrlx and ctrla are reversed. (Using cygwin) – slashdottir – 2017-08-13T17:50:10.033
Thanks. This works a charm. And now I know what octal numbers are, and about different number formats in vim. – Jonathan – 2011-11-27T21:24:51.227
@Jon - Glad it helped. – Rook – 2011-11-27T22:25:41.370