xyb3rt / urxvt-perls

Perl extensions for the rxvt-unicode terminal emulator
GNU General Public License v2.0
754 stars 110 forks source link

[RFE] Add yy command #62

Closed memeplex closed 9 years ago

memeplex commented 9 years ago

It would be useful to copy the current line to the clipboard efficiently as it is a frequent operation.

xyb3rt commented 9 years ago

keyboard-select does only have vi-like key-bindings, it is not really modal. Using Y would be possible, but all of the yy, yj or 3yj are not possible.

memeplex commented 9 years ago

Y will be ok as vi(m) is already inconsistent in its definition: it's the same as yy.

That said, the most common use case I found for "yank line" is to copy the current line (say you're in the interactive shell of your favourite language) to an editor. Maybe a direct shortcut similar to keyboard-select:search will fit the bill also (or even better).

xyb3rt commented 9 years ago

Does your shell not offer this feature directly? For instance, bash has edit-and-execute-command (C-x C-e) and zsh edit-command-line in zshcontrib.

memeplex commented 9 years ago

Yes, it does. But there are other use cases. Mainly, you're in an interpreter shell, say ipython, and exploratory build some complex line that you want to copy to your editor, which is already open in some other window.

xyb3rt commented 9 years ago

Sorry that it took so long to find some time to add this. Enjoy!

memeplex commented 9 years ago

Thanks :)