Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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).

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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