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!
Written by Rahim Sonawalla
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#