[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH] possible new feature: allow binding a key to a
From: |
David Ramsey |
Subject: |
Re: [Nano-devel] [PATCH] possible new feature: allow binding a key to a string |
Date: |
Sun, 4 Feb 2018 16:22:09 -0600 |
Benno Schulenberg:
> I don't see why it should be "instead".
Agreed; I misphrased it. Sigils would be an option instead of a
complete replacement.
> The sigils will have to be translated to key values anyway for things
> to work, so... having raw keycodes in the string already will work
> fine too.
Point.
After thinking some more, I've changed my mind somewhat on the urgency
of sigils. Adding sigils will make any macros defined in a nanorc
portable across different keybindings, but they'll also lessen the
ability of such macros to insert text (at least in a simple manner). If
the sigils are like what Brand came up with, such as "${replace}", how
would the user insert a literal $, {, or } in a macro without making
parsing the string much more complex?
If the user can do it inside nano, but not inside a nanorc, that's a
problem in itself. Lack of portability is an issue, but loss of
flexibility is one too; if I had to pick only one to avoid, the latter
is worse. The former should ideally be fixed, but it's a question of
exactly how to do it.