Vim Recall繁體中文

Decrement a number

Ctrl-x

Example

Normal 0 / 1
item 12
Cursor on line 1, column 6

Subtract one from the number at or after the cursor on the current line.

Before & after
Before
item 12
Cursor on line 1, column 6
After
item 11
Cursor on line 1, column 7

Start in Normal mode. Cursor starts on the 1 of the decimal number. Press Ctrl-x.

Details & Vim help

Example replayed in Vim

Subtract one from the number at or after the cursor on the current line.

Vim searches at or to the right on the current line for a supported number. A count multiplies the amount: 5Ctrl-x subtracts five. Vim’s nrformats option controls which number formats and single alphabetic characters are recognized.