Vim Recall繁體中文

Add contents of register in the text

:put

Example

Normal 0 / 2
red
blue
Cursor on line 1, column 1

Add contents of register in the text.

Vim registers

a Register a
Linewise · ↵ marks a line breaksaved↵
· space ⇥ tab ↵ line break
Before & after
Before
red
blue
Cursor on line 1, column 1

Vim registers

a Register a
Linewise · ↵ marks a line breaksaved↵
· space ⇥ tab ↵ line break
After
red
saved
blue
Cursor on line 2, column 1

Vim registers

a Register a
Linewise · ↵ marks a line breaksaved↵
· space ⇥ tab ↵ line break

Subject: :put. Documentation-backed illustration; assumes modifiable buffer, cursor line 1 and prepared linewise register a; not replay-verified. Puts register a linewise below the current line. The cursor moves to the first inserted line; the register keeps its contents.

Details & Vim help

Add contents of register in the text. 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. The index spelling :pu[t] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.