created 2005 · complexity basic · author Al Vega · version 6.0
- xclip is a command line utility that is designed to run on any system with an X11 implementation. It provides an interface to X selections ("the clipboard") from the command line. It can read data from standard in or a file and place it in an X selection for pasting into other X applications. xclip can also print an X selection to standard out, which can then be redirected to a file or another program.
I have had a lot of pain with the clipboard until xclip appeared in scene. I mix it with Vim in the following way:
:map <F7> :w !xclip<CR><CR> :vmap <F7> "*y :map <S-F7> :r!xclip -o<CR>
Press F7 to copy all current buffer to clipboard, or a selection, or press shift-F7 to paste all clipboard contents.
I prefer doing this way because
"*p is slow with a lot of data.