|
From: | Mike Scalora |
Subject: | Re: [Nano-devel] Escape-Escape keyboard sequences |
Date: | Fri, 25 Mar 2016 07:10:39 -0600 |
Hi Mike,
Thanks for the patch.
On Wed, Mar 23, 2016, at 12:27, Mike Scalora wrote:
> After trying several workarounds unsuccessfully, I've created a patch for
> nano to support some escape sequences used by iTerm, a terminal program on
> the Mac that is very popular among programmers.
Do you mean iTerm sec, or iTerm2? Or doesn't that make a
difference?
> I'm happy to go into more detail why I think this patch should be accepted
Yes, please.
> and I would be happy to revise the implementation.
>
> The escape sequences I added support for are:
>
> ^[^[[a - Option-<up-arrow> - home
> ^[^[[b - Option-<down-arrow> - end
Aren't Command+Left-arrow, Command+Riight-arrow used for
Home and End, that is: for beginning-of-line and end-of-line?
> ^[^[[c - Option-<right-arrow> - word_right
> ^[^[[d - Option-<left-arrow> - word_left
>
> nano then matches the use of these keystrokes by the command line editor.
You use lowercase letters here, but in the patch uppercase.
I suppose the latter ones are correct?
> Please let me know if you are open to accepting a patch for this and/or
> what adjustments you would like.
When the patch works, doesn't break anything, and adds
intuitive keybindings on one more terminal, it's fine with me.
About the patch itself... I don't like the 'escescob' name.
First I made it into 'esc_esc', then into 'mac_esc' for more
contrast with 'escapes'. If you find a still better name,
please use that. Also, the thing can have just two values,
so better make it into a bool, for still more contrast with
'escapes'. Further, instead of doing '&& !escescob', why
not put the escescob case first, then the setting of it,
and then the get_key_buffer_len() == 0 case?
Benno
--
http://www.fastmail.com - The professional email service
option_arrows_2.patch
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |