Last Updated: February 25, 2016
·
922
· rahims

Quickly increment/decrement

While in command mode in vim, type CTRL+A to increment the number under the cursor by one. Type CTRL+X to decrement the number.

This works for decimal, hex, and event octal numbers!

2 Responses
Add your response

The number doesn't have to be under the cursor. C^a, C^x work also on the first number on the right.

over 1 year ago ·

42<Ctrl-A> to increment by forty-two

over 1 year ago ·