Created
January 28, 2026 23:28
-
-
Save eventualbuddha/16ce9afb9311b16ba09f4edc79d7c099 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- neovim fix for copying within an ssh session (debian 12 vm guest + cosmic terminal host, anyway) | |
| -- put this in ~/.config/nvim/lua/config/autocmds.lua | |
| vim.api.nvim_create_autocmd("TextYankPost", { | |
| group = vim.api.nvim_create_augroup("osc52_yank", { clear = true }), | |
| callback = function() | |
| local text = table.concat(vim.v.event.regcontents, "\n") | |
| local b64 = vim.base64.encode(text) | |
| vim.api.nvim_chan_send(2, string.format("\027]52;c;%s\a", b64)) | |
| end, | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment