Pretty sure most of you already know this but for those who don’t: you have two clipboards in Linux. One is the traditional clipboard where you copy with control c and paste with control v. The other one is when you highlight text and use the mouse middle click to paste text.
More details here.
works with vim but never tested on vi
It does not work in vi. The + and * register were a vim invention (tested in vim compatibility mode and busybox vi)