Vim Recall繁體中文

Insert a register without leaving Insert mode

<C-r>0

Example

Insert mode. Cursor before ! in Hello, !. Yanked Ada with yiw into register 0.

Before
Hello, !
  1. <C-r>0 Hello, Ada! · stays in Insert mode
After
Hello, Ada!
Details & Vim help

Insert from register 0 directly while typing.

Compose a new line around copied text without changing modes repeatedly.

Register 0 keeps the latest yank made without choosing another register. Insert-mode Ctrl-r inserts register contents as typed, so indentation and formatting options can affect the result. Ctrl-r Ctrl-o inserts literally without autoindent.

Insert-mode cursor is before !; register 0 contains “Ada”.

Try it in Vim

  1. Yank the desired text without choosing a register, for example with yiw.
  2. Enter Insert mode at the destination.
  3. Press Ctrl-r, release it, then type 0 for register 0; use another register name when needed.