Vim Recall繁體中文

Remove the text covered by the motion [into register x] and start insert

c{motion}

Example

Normal 0 / 4
One TWO
  three four
keep
Cursor on line 1, column 1

Remove the text covered by the motion [into register x] and start insert.

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
- Small delete register
CharacterwiseEmpty
· space ⇥ tab ↵ line break
Before & after
Before
One TWO
  three four
keep
Cursor on line 1, column 1

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
- Small delete register
CharacterwiseEmpty
· space ⇥ tab ↵ line break
After
new TWO
  three four
keep
Cursor on line 1, column 3

Vim registers

" Unnamed register Changed
Characterwise · Uses Small delete registerOne
- Small delete register Changed
CharacterwiseOne
· space ⇥ tab ↵ line break

Start in Normal mode. The key buttons show a concrete motion in place of {motion}. Indentation uses shiftwidth=2.

Details & Vim help

Example replayed in Vim

Remove the text covered by the motion [into register x] and start insert. 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.