Yank to the next word
yw
Example
Normal 0 / 2Operator pending 1 / 2Normal 2 / 2one twoCursor on line 1, column 1one twoCursor on line 1, column 1one twoCursor on line 1, column 1Copy from the cursor toward the next word start.
Vim registers
"Unnamed register- Characterwise · Uses Yank register 0
saved 0Yank register 0- Characterwise
saved
Waiting for motion or text object
Vim registers
"Unnamed register- Characterwise · Uses Yank register 0
saved 0Yank register 0- Characterwise
saved
Copy from the cursor toward the next word start
Vim registers
"Unnamed register Changed- Characterwise · Uses Yank register 0
one· 0Yank register 0 Changed- Characterwise
one·
Before & after
one twoCursor on line 1, column 1Vim registers
"Unnamed register- Characterwise · Uses Yank register 0
saved 0Yank register 0- Characterwise
saved
one twoCursor on line 1, column 1Vim registers
"Unnamed register Changed- Characterwise · Uses Yank register 0
one· 0Yank register 0 Changed- Characterwise
one·
Start in Normal mode. Cursor starts on o. Press yw; the unnamed register contains "one ".
Details & Vim help
Example replayed in Vim
Copy from the cursor toward the next word start.
The y operator stores the motion range in a register without changing the buffer. At a word start this commonly includes the following space; use yiw for the inner word alone.