0

I cannot get NeoVim to work like nano does out of the box with regards to clipboard copy/paste. Here is exactly what I am trying to do:

  • I use either a linux laptop (Linux Mint) or a Chromebook running the Linux subsystem to access my servers via SSH.

  • If I start nano on any of my servers (all run Ubuntu 22.04) I can copy/paste anything from my laptop or chromebook into nano (on the server) without issue.

NOTE: None of my linux servers have any Xserver installed at all. They are servers.

I've tried following all the help in NeoVim to get the clipboard working, but it seems xclip, xset, etc., want to install an entire Xserver on my linux servers. I am not willing to do that, especially considering nano doesn't need it to work.

1 Answer 1

0

My guess at the misunderstanding: the copy/paste you are using is your laptop's or SSH client's or terminal's mechanism (presumably your Mint computer runs a display, probably X-based…). So when you copy/paste around nano, you aren't actually using nano to access the server clipboard, etc.

Try using NeoVim on your local machine and editing over SSH with netrw (builtin to Vim, at least…). (I wouldn't generally consider it a great idea to run something like NeoVim on the server, anyway. Extra attack surface and all that. Though I guess you have to have an editor, just in case…)

2
  • Thanks for the clarification as to the laptops running X (and yes both are, as the chomebook runs x under the hood as well).. That being said, NANO is still capable of doing what I want, and as my internet connection is spotty at best, it is actually preferred to run the editor on the server in a screen session this way if the internet goes foobar I just re-log back in and carry on where I left off. So for me, running the editor on the server is the best solution for me. Do you know how NANO is able to accomplish this and can it be replicated using Neovim? Apr 17, 2023 at 14:51
  • Remote editing with netrw only requires a brief connection to read the file, and again to write it @AndreNormandin
    – D. Ben Knoble
    Apr 17, 2023 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.