I come from a Windows background where Cut/Copy/Paste are almost always CTRL+X/C/V respectively. I like this consistency, so adjusting to Cygwin's (or other *nix environments') use of SHIFT+INSERT or the middle mouse button for pasting in terminals is a little annoying. After a bit of googling, I found a mailing list thread that solved my problem.
This method uses a modification to readline's ~/.inputrc configuration file, so it should work in rxvt, xterm, or even the default cmd.exe shell. Here is what to do:
Add the following line to your ~/.bashrc:stty lnext ^q stop undef start undefAnd add the following line to your ~/.inputrc:
"\C-v": paste-from-clipboard
These modifications will unmap stty's lnext (literal next-character) and
readline's
quoted-insert settings which are normally mapped to CTRL-V.
For more details, see
this cygwin mailing list thread.
Note, this appears to be a Cygwin-specific solution. Linux users could use custom key
bindings in gnome-terminal or konsole, or translation tables
with xterm.
$ bind -p$ stty -aTHANK YOU for this information. Why didn't I google this before?? :-)
Fair warning for those who want to try Terminator.
The stty command for Cygwin brings up an error in terminator. Apparently there's an stty.exe that was hatched without one or the other of the commands in that string. Curiously enough, the Xterm-based terminals don't seem to have this problem.
Terminator supports ctrl-v paste all on its own [it should -- it requires the Cygwin/X java and ruby files to run...for that kind of disk cost it should also polish my shoes. :)] BZT
Thanks!! is perfect.
But if I want to use Ctrl+C to copy???
use C-c seems not work.
Thanks in advance
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »