5

I can increment integers in Vim using <Ctrl>-a. The docs seem to say that if I set nrformats to "octal,hex,alpha" (which I am trying to do with :set nrformats="octal,hex,alpha") then <Ctrl>-a will increment a to b, 007 to 010, and 0x09 to 0x0f, but those examples are not working for me (I just a get a beep for a, 007 turns into 008, and 0x09 turns into 0x10).

1 Answer 1

6

The quotes were the problem, I should have typed :set nrformats=octal,hex,alpha or :se nf=octal,hex,alpha.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.