Increment and Decrement in Vim

Nudge the number under the cursor up or down without retyping it.

Commands you practise

Ctrl-a
Increment the next number on the line by one. Use <C-x> to decrement. It is the fastest way to update version numbers, dates, or lists.
Ctrl-x
Subtract one from the next number on the line. No need to enter Insert mode or even position your cursor directly on the digit.

Levels

  1. Port Shift (easy): Shift the service port numbers sequentially using increment.
  2. Version Flip (medium): Update the dependency version constraints using increment and decrement.
  3. Symmetric Margin (hard): Adjust the box margins symmetrically using count-prefix increments and decrements.

Each level opens a real Neovim session in your browser with a start file and a target file. Edit one into the other in as few keystrokes as you can, then race the vimbot's solution.

Part of VimGolf.ai Premium ($10 once, lifetime). Region: change and substitute (operator). See the whole skill map.