Vim Recall繁體中文

Change a WORD with adjacent whitespace

caW

Example

Normal 0 / 4
one alpha-beta three
Cursor on line 1, column 8

Change the range selected by aW.

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
- Small delete register
CharacterwiseEmpty
· space ⇥ tab ↵ line break
Before & after
Before
one alpha-beta three
Cursor on line 1, column 8

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
- Small delete register
CharacterwiseEmpty
· space ⇥ tab ↵ line break
After
one greenthree
Cursor on line 1, column 9

Vim registers

" Unnamed register Changed
Characterwise · Uses Small delete registeralpha-beta·
- Small delete register Changed
Characterwisealpha-beta·
· space ⇥ tab ↵ line break

Start in Normal mode, at line 1, column 8 (one-based). Change a WORD with adjacent whitespace. This enters Insert mode; the example types green and then Escape. Press caW. The demonstrated replacement is green; finish it with Escape.

Details & Vim help

Example replayed in Vim

Change the range selected by aW.

Change a WORD with adjacent whitespace. This enters Insert mode; the example types green and then Escape.