Hello:
Today I faced the same situation where I needed to be able to access my desktop environment (MATE) clipboard, just as I do in another laptop with different OS.
TL;DR: you need a different package instead of the vanilla vim-8.2.4851
. In my case, it was vim-gtk3-8.2.4851
. Use pkg search vim
in order to see which one is appriate for your desktop environment.
Details:
Normally, from inside vim
I can select something and press "+y
in order to have it copied into the DE's clipboard. Then, I can go to any other app (E.g. Pluma) and use Ctrl+v
.
It also works the other way around, I copy something from any app in the desktop environment (Ctrl+c
), then I can paste it in vim using "+gp
, which will have a similar effect as Ctrl+v
, but will avoid undesired indentation and new lines to be inserted if you are copying code between apps.
Initially I had installed vim-8.2.4851
using pkg
. This resulted in -xterm_clipboard
. After installing vim-gtk3-8.2.4851
(which automatically removed vim-8.2.4851
), I have +xterm_clipboard
enabled.
I hope this helps.