I’m quite noob in nvim, not sure if it has builtin feature of key command to swap the selection text with its " (clipboard) register.
So an one kind enough to clarify or laborate ?
Not built-in that I know of, but probably a fairly simple remap:
vim.keymap.set("n", "R", '*N"_diwp')
*N
bounces to the next and back so you can n.
to repeat on the next instance if necessary, "_diw
throws the current word into the void, and then just p
should paste the empty register.
Or you could break it down so delete to void then p
work:
vim.keymap.set("n", "<leader>p", '"0p')