I'm trying to create an autocmd
that copies selected text in visual mode in Neovim (preferably when selecting text with the mouse and copy on mouse button release)
I've tried so far:
vim.api.nvim_create_autocmd({"ModeChanged"}, {
pattern = "[vV\x16]*:*",
callback = function()
vim.cmd('"*y')
end,
})
If I do a command ="echo 'test'"
instead of callback
I can see the text once selected then hitting Esc so the autocmd
somewhat works.