Vim: Incrementing numbers.

You can increment a number in VIM by using the CTRL+a command. Decrementing a number with CTRL+x. This by itself isn't new.

However, I recently learned that you don't have to have the cursor on the number for these key combination to work. Using CTRL+a or CTRL+x anywhere on a line with a number will increment/decrement the nearest number right of the cursor.

Show Comments