Here's another solution. One that I personally prefer.
It uses Xsel. It's very similar to Xclip but with a key difference.
$ cat my_funky_file | xsel
While Xclip puts everything in the main clipboard, Xsel manipulates the selection buffer letting you paste the selection with a middle-click. This is great for one-offs! So if you have something in your clipboard that you haven't pasted yet, that would stay unaffected!
And if you want to paste the content, xsel -o will spit it right out.
You can install it on a debian based system using
$ apt-get install xsel
The source is available here otherwise! Hope this helps someone.
vimis much better. – Black May 29 '17 at 08:25ctrl+homethenctrl+shift+endand thenalt+6to copy. This isn't an answer because it doesn't answer the entire question. – Brōtsyorfuzthrāx Sep 14 '22 at 19:56