How the hell do I copy from vim to my system clipboard, I always have to launch kate and copy and do :q on kate then clear it and then launch vim and do the rest.
2 months ago 路 馃憤 rwa
@scientiac for some reason Station stripped the plus characters from my previous comment. There should be a plus between " and y in my examples instead of a space. 路 2 months ago
To copy into a register, you can use "<register>y<movement>
So for example, to copy the text from the cursor position to the end of the current line into the a register, you can use:
"ay$
The system clipboard is a special register called . So if you want to copy into the system clipboard, you can type:
" y$
More examples:
" yi" - copy the contents of the next quote
" yt; - copy everything from the cursor to the next semicolon
etc.
In visual mode, you can use the same pattern but you don't specify a movement (because commands operate on the current selection). So you just select what you want to copy and type " y 路 2 months ago
I am using linux, I normally do :se nonu then copy by normal command then :se nu to bring back line numbering. But this is too many clicks. 路 2 months ago
In visual mode: " (pick register) then * (system register in mac and windows) then y (yank). "*y 路 2 months ago