adsr / mle

flexible terminal-based text editor (C)
Apache License 2.0
827 stars 53 forks source link

How do I copy something to the system clipboard #28

Closed hovsater closed 4 years ago

hovsater commented 4 years ago

For instance, if I copy a line using M-k, how do I get the selection into my system clipboard? Right now I'm doing M-e echo "C-u" | pbcopy.

adsr commented 4 years ago

I added an example Lua script which does this:

https://github.com/adsr/mle/blob/3f3b9175fe3e124d2f06ca9bee2346a8fb7c5758/uscript.lua#L17-L25

(Can replace xclip with pbcopy.)