Adjust a number with a count
5<C-a> or 5<C-x>
Example
Normal mode. Cursor on 12 in retries = 12.
retries = 12Cursor on line 1, column 11- 5<C-a> Add 5 · retries = 17
retries = 17Cursor on line 1, column 12Details & Vim help
Add or subtract a count from the first number at or after the cursor on the current line.
Update quantities without selecting and retyping digits.
nrformats controls recognized formats, including hexadecimal and optional octal or alphabetic values. In Normal mode g Ctrl-a is not the Visual sequence command.
Try it in Vim
- Place the Normal-mode cursor on the number.
- Type 5 then Ctrl-a to add five.
- Use 5 then Ctrl-x to subtract five instead.