Vim Recall繁體中文

Subtract the count from number in selected text

Ctrl-x

Example

Visual line 0 / 1
1
2
3
Cursor on line 3, column 1 · Line selection

Subtract the count from number in selected text.

Before & after
Before
1
2
3
Cursor on line 3, column 1 · Line selection
After
0
1
2
Cursor on line 1, column 1

Start in Visual line mode. The highlighted area is observed in Vim. Any displayed register boxes show the exact copied or deleted contents.

Details & Vim help

Example replayed in Vim

Subtract the count from number in selected text. Use in Visual mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative. Vim changes the first eligible value on each selected line within the selection. The 'nrformats' option controls recognized number formats.