For the case of yanking one thing, deleting others, then pasting the yanked text instead of deleted text, I use the last-yanked register.
from :help "0
:
Vim fills these registers with text from yank and delete commands.
Numbered register 0 contains the text from the most recent yank command,
unless the command specified another register with ["x].
Numbered register 1 contains the text deleted by the most recent delete or
change command, unless the command specified another register or the text is
less than one line (the small delete register is used then). An exception is
made for the delete operator with these movement commands: %, (, ), `,
/, ?, n, N, { and }. Register "1 is always used then (this is Vi
compatible).
So, after yw and then some dw (or whatever), I can paste the yanked text with "0p
For more complicated tasks (deleting multiple things and pasting the different multiple things) I either anticipate ahead of time and use named registers (e.g. "adw), or check the contents of the numbered registers after the deletions to see which ones have what I want to paste, using :registers
, which might show something like
"0 char *^J
"1 ^I^I^Iint utf8flag = 1;^J
"2 ^Istruct window^I^I*w^J
If I want the struct window line, I'd then do "2p