I always forget how to yank to the system clipboard in vim.
I know I could set clipboard=unnamedplus
in my configuration but I read a
comment explaining that it can have performance issues.
https://github.com/neovim/neovim/pull/25872#issuecomment-1808595423
So let's see if documenting it helps solidify it in my brain.
First get into an appropriate visual mode. v selects the standard visual mode, SHIFT-v selects visual-line mode, and CTRL-v selects visual block mode. Next, select the text that you want to select. Finally, "+y.
" means register.
+ specifies the system clipboard register.
y is yank.
So "+y yanks into the system clipboard register.
more info on registers:
:help reg inside vim
Tutorial on vim registers: https://www.brianstorti.com/vim-registers/