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
.
In normal mode, typing Ctrl-A will increment the next number, and typing Ctrl-X will decrement the next number. The number can be at the cursor, or to the right of the cursor (on the same line). These are the defaults for Vim, although some scripts remap these keys to perform other functions.
If you don't want to increment numbers in octal notation, :set nrformats-=octal
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With