Install a clipboard manager.
For example, I use clipmenu. I start it whenever X is started by putting this
CM_OWN_CLIPBOARD=1 clipmenud &
in my ~/.xinitrc.
Yours is a common misunderstanding when talking about X selections.
From Arch Wiki: Clipboard:
According to the selection protocols, nothing is copied until it is pasted. For example, ...
The substitute command can accept a range prefix. Without it, like:
Will just substitute on the current (cursor) line.
Will substitute on the whole file.
Will substitute on lines 5 through 10, inclusive.
When you visually highlight some text, there are two marks that are automatically updated, mark < denoting ...