There are a few ways to do this (and I can never remember a single freaking one of them). The best option is to use the changes history:
View the change history:
The current position is the history is marked by a
Jump back in the history:
This appends the copied selection into a register, so first clear the register using
qaq (for the
a register - use
b, etc). This records an empty macro into the register, so you will see messages relating to macros in the status line.
Multi-select yank using
:g/<search term>/y A
Multi-select delete using
:g/<search term>/d A
Multi-select move using
:g/<search term>/m <line to move to>
Also see: https://vim.fandom.com/wiki/Power_of_g
A is the
a register, but the uppercase variant causes the command to append to the register. If you didn't append then you will only end up with the last selection in the register.
a is the register.
You can view the currently used registers with
The registers can fill up with crap over time if you have persistence turned on. You can clear out all the registers using the following command:
let regs=split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/-"', '\zs') | for r in regs | call setreg(r, ) | endfor | unlet regs
Turn on spell checking (I usually have it off by default)
z=. I also have Telescope configure to do that with
:spellrepallto repeat a replacement throughout the document.