Skip to content

Instantly share code, notes, and snippets.

@jldiaz
jldiaz / README.md
Last active April 11, 2024 07:45
Copy/paste into vim registers via ssh tunnel

These scripts allows you to use vim in a remote machine via ssh, and being capable of sharing the local clipboard with vim's 0 register (which is the one used by default by yank/paste).

To make it work:

  1. In your local machine, run clipboard-server.py, which uses flask to create a simple REST API exposing only the / endpoint, listening on localhost:11223

    GET / will retrieve the system clipboard of the machine in which the server is run, in form of a JSON with the field "content".