There are several ways to solve the problem. Vimsa has already been offered.
Another way to solve the problem is to copy your important text into the named register. Let's say you wanted 5 lines of text to be deleted from one place and copied to another place.
"a5dd will delete 5 lines of text and save them in register a .
Perform various operations.
Now move to the place where you want to copy them.
"ap or "ap will copy 5 lines of text from register a to the current location.
source share