Keyboard text selection/cut and paste

From SGenomics

Jump to: navigation, search

I've been trying to rid myself of the mouse. The final thing holding me back is cut and paste for terminal applications. Turns out that most Linux terminal programs don't have any support for keyboard based cut and paste. And in fact the only mainstream terminal app I've seen it in the The OS X Tiger Terminal.app (it seems to have been removed from later versions).


Anyway, after some hunting I found a Linux terminal program that does text based cut and paste. It's called jvterm. The downside is that though it's an X11 application it's not really designed to run in concert with X. It only works full screen and you can't alt-tab between it and X applications. Anyway, I couldn't find the documentation for text based selection so here's typically how you might use it:


Press Shift twice to enter selection mode

Use the cursor keys to move to the start of the selection region

Press Shift again

Move to the end of the selection region (text will be highlighted)

Press space


The text will now be on the clipboard. To paste it press Shift Twice and then Enter.


This is a really neat feature, and I hope it finds its way in to other terminal applications.

(protip: Read the man page. I found this out from guessing, but it's actually in the man page).

AHHH! You can do something similar with screen but how do I get it to share the X clipboard?!?


There's an urxvt script for it! I found it in google cache and have copied it here:

Image:Mark-and-yank

To use it press alt-y to activate. Move using vi style keystrokes (hjkl) then press space to start selection and space to end. The text appears on you x buffer via xclip! Neato!

Personal tools