Begin entering an Ex command with range from current line to the count-1 lines down
{count}:
Example
Normal 0 / 3Count pending 1 / 3Command-line 2 / 3Normal 3 / 3one
two
three
keepCursor on line 1, column 1one
two
three
keepCursor on line 1, column 1one
two
three
keepCursor on line 1, column 1keepCursor on line 1, column 1Begin entering an Ex command with range from current line to the count-1 lines down.
Prepare a count of three.
Translate the count to the current line and next two lines.
Command line
- Input
:.,.+2
Delete exactly the three ranged lines.
Vim registers
"Unnamed register Changed- Linewise · ↵ marks a line break
one↵ two↵ three↵
Before & after
one
two
three
keepCursor on line 1, column 1keepCursor on line 1, column 1Vim registers
"Unnamed register Changed- Linewise · ↵ marks a line break
one↵ two↵ three↵
ILLUSTRATION. Choose count 3 at the first of four lines; complete with d to demonstrate the supplied range.
Details & Vim help
Begin entering an Ex command with range from current line to the count-1 lines down. Use in Normal mode. Braced names stand for the required argument and are not typed literally. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.