On 4 April 2011 16:18, Bryan Bennett <bbenne10_AT_gmail.com> wrote:
> While I understand wanting applications to adhere to the Unix
> Philosophy, it seems to me that inputting and outputting text
> is what a terminal essentially does and copying & pasting is
> just a small extension of that role. I'd like to see a sane
> way of copying & pasting with the keyboard, rather than
> relying on the mouse for that.
How about something similar to Vimperator's edit-textbox idea?
You hit a key-combo, and the terminal writes what is visible on the
screen to a temporary file, then fires up $EDITOR on said file. You
delete what you don't want, then the rest is inserted into X's
selection.
I've knocked together a quick patch, attached, along with a whitespace
patch that removes trailing whitespace. At the moment, the "key-combo"
is middle mouse.
The patch is a bit of a bodge too - it doesn't support unicode
characters properly and for the system() call to work, SIGCHLD is reset
temporarily, which could be a problem if the shell dies mid-selection
edit. I'm open to suggestions. Avoid system() entirely?
Also, I wasn't sure how to open $EDITOR in st's terminal itself, if
people are interested I'll give it a go, but for the moment it just
fires up another st to host the editor.
Cheers,
Rob.
This archive was generated by hypermail 2.2.0 : Tue Apr 05 2011 - 14:48:03 CEST