Vim Recall繁體中文

Use the last Visual area, like :'<,'>

:*

Example

Normal 0 / 2
one two
three four
five six
keep
Cursor on line 4, column 1

Use the last Visual area, like :'<,'>.

Local marks

'.
line 2, column 1
'<
line 1, column 1
'>
line 2, column 1
Before & after
Before
one two
three four
five six
keep
Cursor on line 4, column 1

Local marks

'.
line 2, column 1
'<
line 1, column 1
'>
line 2, column 1
After
one two
three four
five six
keep
Cursor on line 2, column 1

Local marks

'.
line 2, column 1
'<
line 1, column 1
'>
line 2, column 1

Start in Normal mode. The first two lines were previously selected linewise with ggVj, then Esc ended Visual mode and the cursor moved to line 4. :* uses that remembered Visual line range and moves to its last line.

Details & Vim help

Example replayed in Vim

Use the last Visual area, like :'<,'>. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.