How do you paste over a visual selection without losing the register?
Answer
"_dP or use "0p
Explanation
When pasting over a selection, the replaced text overwrites the unnamed register. Use "0p to always paste from the yank register, or "_dP to avoid the issue.