Showing posts with label clipboard. Show all posts
Showing posts with label clipboard. Show all posts

Sunday, October 16, 2016

Vim clipboard copy paste workaround

Vim clipboard copy paste workaround


I love Vim. But the somewhat difficult to handle system clipboard integration just doesnt seem to fit in with me. I made a recompile to get +xterm-clipbard option, but the whole Ctrl-C Ctrl-V thing was missig. And I didnt want to recompile everytime. Got a nice workaround using xclip :) here [ http://vim.wikia.com/wiki/In_line_copy_and_paste_to_system_clipboard ]
Just to make a note / backup, heres what you have to do. Just put that into your .vimrc

" Copy paste from clipboard
vmap y: call system("xclip -i -selection clipboard", getreg("""))
nmap :call setreg(""",system("xclip -o -selection clipboard"))p
Youre good to go.

Go to link download

Read more »

Tuesday, August 16, 2016

Copying text from GNU screen to clipboard

Copying text from GNU screen to clipboard


GNU Screen is a great tool for command line junkies, who have declared war against the useless device called Mouse. But, it has a learning curve. I was looking for a way to copy text from my terminal to the system clipboard and a great SO answer helped me [ http://stackoverflow.com/a/16286619 ].

Heres the summary
Copy text from your screen session into GNU screens copy buffer.
Run this command within screen: cat | xsel -b
Dump screens copy buffer to STDIN: Ctrl+a+]
Send an EOF to cat to terminate it: Ctrl+d


Go to link download

Read more »