Closed marsjane closed 1 year ago
yy
uses the unnamed register. Try with:
function copy()
if vim.v.event.operator == 'y' and (vim.v.event.regname == '' or vim.v.event.regname == '+') then
require('osc52').copy_register('+')
end
end
wow it works, thanks!! Btw, I need to use local function
in my case.
I used the config provided in the readme
In this case, if I use
"+yy
to yank, the contents will be yanked to the system clipboard and I can paste it anywhere, but if I directly useyy
to yank, nothing will be copied to the system clipboard, I used the:reg
to checked the register, the contents is in the+
register, why it is not copied to system clipboard?