In vim et al, you can increase or decrease the number your cursor is on by using CTRLA and CTRLX. However, this increases the whole number but I would like to simply increase the number directly under the cursor. It's a little hard to describe so here's what I mean:
Ctrl+A usage, cursor is over the "6":
[6]5 -> 66
What I need:
[6]5 -> 75
or:
3[8]90 -> 3990
I hope that makes sense.
I've googled a bit but I'm not sure if such a shortcut exists so any tips are much appreciated!
<C-a>
and <C-x>
work on whole numbers (1 or more digits) but not on "parts" of a number. However it takes a "count" so 10<C-a>
turns [6]5
into 75
.
Another option, since you only want to change one digit, would be to do r7
to turn [6]5
into 75
.
In this case, I usually type r and then the digit I want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With