Op woensdag 11 oktober 2006 11:46, schreef Marius Roets: > Hi everybody, > > I'm using Vim 7.0.94 on Linux. I use C-A and C-X from time to time to > increment/decrement numbers. However when there is a leading zero I > get very strange behaviour with both. > Example: > 01 > 02 > 03 > 04 > 05 > 06 > 07 > 08 > 09 > 10 > 11 > > :nmap <F7> <C-X>j > > 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.
That's because vim knows about octal numbers (base 8 instead of 10). Octal numbers normally start with a 0. > Do others see the same behaviour. What am I missing? No I don't, I don't like this behaviour as well, so I've put the following in my .vimrc: set nrformats-=octal Peter