On my machine the included vim program did not container clipboard support. This means you cannot yank from vim to the system clipboard and paste. You can tell this by running:
‘vim --version’ and seeing if +clipboard
exists. if it’s -clipboard
it is not compiled in.
To fix this issue you can build vim from source but first you need a dependency.
sudo swupd bundle-add devpkg-libX11
will install the required X11 headers that Vim wants to link against.
After you have done this simply checkout the vim repository here: Vim - the text editor · GitHub
do a fetch of all tags 'git fetch --all --tags`
checkout the tag you’d like to build and then perform a
sudo ./configure && sudo make && sudo make install
at the root of the repo.
The resulting vim binary will be in ./src directory. I typically copy this to /usr/local/bin when done.
For this to work I do need to remove the vim in /usr/bin/ - as I understand it upgrades may place this back. Whats a better solution to overwrite binaries in /usr/bin? Maybe change /usr/local/bin to be before /usr/bin in $PATH ?