When I have to replace a word with another word I yank before, I usually use a workflow which seems unnatural to me:
Let's say I have this text:
foo bar buzz
And I want to yank
foo and replace
bar with what I yanked before.
foo, I see the following options:
Place the cursor on
fooin front of
Put the cursor on the
bof the remaining
barand delete the word with
Put the cursor on bar with
Put the content of the register 0 with
"0P(since I erased
fooisn't accessible anymore with a simple
Both ways seems over-complicated to me and I'm sure there is a more efficient way to achieve this action but I can't find how. This idea would be to combine the delete and the put actions in only one, or at least avoid to keep the deleted word in the yank register so as I can put the desired word with a simple
Also I know the replace mode triggered with
R but it doesn't allow to put what was yanked.
TL;DR: How to replace a word with the content of the yank register?