💾 Archived View for station.martinrue.com › scientiac › e1091115b4e947699d08129f044678d2 captured on 2022-07-16 at 14:53:13. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-06-03)

➡️ Next capture (2023-01-29)

🚧 View Differences

-=-=-=-=-=-=-

👽 scientiac

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.

8 months ago · 👍 rwa

Actions

👋 Join Station

4 Replies

👽 negepezzannyitfiam

@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. · 8 months ago

👽 negepezzannyitfiam

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 · 8 months ago

👽 scientiac

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. · 8 months ago

👽 nristen

In visual mode: " (pick register) then * (system register in mac and windows) then y (yank). "*y · 8 months ago