Vim Recall繁體中文

Move to last line in {range}

:{range}

Example

Normal 0 / 2
alpha
beta
gamma
Cursor on line 1, column 1

Move to last line in {range}.

Prepared range

Address 2
beta
Address 3
gamma
Before & after
Before
alpha
beta
gamma
Cursor on line 1, column 1

Prepared range

Address 2
beta
Address 3
gamma
After
alpha
beta
gamma
Cursor on line 3, column 1

Printed range

2
beta
3
gamma

Documentation-backed illustration. three buffer lines; :range selects inclusive line addresses; cmdheight=4, no pending messages, and enough columns for both printed lines without wrapping, so the output fits without a hit-enter prompt. This example supplies range 2,3 to :print: :2,3print prints beta and gamma and leaves the cursor on line 3. The output panel summarizes the two lines and labels their addresses. Primary help: :range.

Details & Vim help

Move to last line in {range}. Replace {range} with line addresses. Press Enter to move to the last addressed line when no command follows; the worked example applies a range to :print. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.