Add the count to number in selected text
Ctrl-a
Example
Visual line 0 / 1Normal 1 / 11
2
3Cursor on line 3, column 1 · Line selection2
3
4Cursor on line 1, column 1Add the count to number in selected text.
Command applied
Before & after
1
2
3Cursor on line 3, column 1 · Line selection2
3
4Cursor on line 1, column 1Start 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
Add the count to 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.