When connected to a remote headless Linux server via SSH, I want to be able to do 3 things:
select text using the mouse and copy the selection into my local X clipboard
paste from local X clipboard into the remote document I'm editing
position editing cursor using the mouse (
Please suggest the best way to achieve all three of these features together.
Here's where I am in my attempts. I'm running KDE and my terminal is Konsole. I get the first two things "free" with Konsole (it just works) but I dont' get the last feature, which would have to be enabled in vim (or neovim).
However, if I invoke
:set mouse=a to get that last feature, I lose both of the other two. My goal is to have all 3 features at the same time.
In my research I checked this question: How can I copy text to the system clipboard from Vim?
My situation bumps into every gotcha listed in that question:
the remote system is not running X. It is a headless Linux server.
vimpackage is compiled with "-clipboard"
I cannot use X11Forwarding with SSH (due to policy and due to remote system not having X)
As far as I know, I cannot use scp to edit files. I have to have root permissions to edit many files, but I cannot make an ssh connection as root (by policy / sshd_config settings on remote system).
the last option suggested there is
neovimwhich is available for me to use. But again, the remote system doesn't have X. However, I understand I may be able to use tmux, but haven't gotten that to work yet.
What is the usual way someone would achieve what I'm trying to do? Are there solutions I have overlooked?
If the best option is neovim + tmux, how do I get that to work? Should I use one of these?