18
In neovim under wayland how do you guys copy and paste things?
(piefed.jeena.net)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
The simplest and slowest way when you need to use something from the system clipboard:
Copying: Enter visual mode (v) Highlight the text I want to copy then enter in command mode
"+y
which basically means "Use a register for following command (") make it the external clipboard register (+) and yank/copy (y)"Pasting Move to where I want to paste then enter in command mode
"+p
to paste after the current position or"+P
to paste before the current positionIf I don't need to copy/paste stuff to applications outside of vim, then I can skip the
"+
register setting part, and just use the default internal register.You can also add
set clipboard=unnamed
to your .vimrc. This makes it so that all yank and paste operations use the system clipboard, but I find it gets in the way more often than it helps.In most cases, yank in Vim just need somewhere to store contents temporarily, not share it with others.