Clipboard Sharing
Clipboards are a mess. Let’s fix that.
Clipboard sync for nerds
I am usually working in remote SSH session, most of the times it’s my homeserver, sometimes my VPS. One main issue in this workflow is not being able to share clipboard between the client and remote server, which is a pain if you “literally live in the remote session.”
Thankfully there is a way to fix it. Enter OSC52.
OSC52 is an ANSI escape sequence that allows you to copy text into your system clipboard from anywhere, including from remote SSH sessions.
Now you could say goodbye to your xclip, pbcopy, clip.exe, etc And use one unified tool, osc.
# installationcurl -s https://i.advik.one/theimpostor/osc! | bash
echo hi | osc copyosc pasteBe sure to check if your terminal supports it.
Integration with neovim
vim.cmd([[let g:clipboard = { \ 'name': 'osc-copy', \ 'copy': { \ '+': 'osc copy', \ '*': 'osc copy', \ }, \ 'paste': { \ '+': 'osc paste', \ '*': 'osc paste', \ }, \ 'cache_enabled': 0, \ }]])