Q:

Why does incrementing with CTRL-A in Vim take me from "07" to "10"?

I have a series of numbers in Mac Terminal Vim which I am incrementing by pressing  CTRL-A. Strangley, when I am at 07, the number skips up to 010 instead of 08. I just tried MacVim and had the same behavior occur. Does anyone know why?
Note: Both Vim's work perfectly for 7.

A:

If you don't want to increment numbers in octal notation, :set nrformats-=octal.

A:

Because a leading zero is a widely used notation for octal, in which the number that comes after 7 is 10. According to Wikipedia, “a prefix 0 is used in the C programming language, Python, Perl, the Unix shell bash, and other languages to specify octal numbers”.

