nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH] bindings: provide usable shortcuts for prevword/nex


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH] bindings: provide usable shortcuts for prevword/nextword in tiny version
Date: Wed, 12 Dec 2018 20:07:13 +0100

In the tiny version the feature toggles are absent, so most of the
Meta-key combinations do nothing, and when --with-slang was used, the
<Ctrl+Left/Right> keystrokes do not work (as they produce truncated
escape sequences under Slang), and the <Ctrl+Space> and <Alt+Space>
keystrokes are awkward to type and make no sense.  So... use some
of the free Meta combinations to jump a word to the left or right,
since these functions *are* present in the tiny version.
---
 src/global.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/global.c b/src/global.c
index 26a8f3e8..2cdd4141 100644
--- a/src/global.c
+++ b/src/global.c
@@ -1179,6 +1179,12 @@ void shortcut_init(void)
                add_to_sclist(MSOME, "^Left", CONTROL_LEFT, do_prev_word_void, 
0);
                add_to_sclist(MSOME, "^Right", CONTROL_RIGHT, 
do_next_word_void, 0);
        }
+#ifdef NANO_TINY
+       add_to_sclist(MMAIN, "M-B", 0, do_prev_word_void, 0);
+       add_to_sclist(MMAIN, "M-P", 0, do_prev_word_void, 0);
+       add_to_sclist(MMAIN, "M-F", 0, do_next_word_void, 0);
+       add_to_sclist(MMAIN, "M-N", 0, do_next_word_void, 0);
+#endif
        add_to_sclist(MMOST|MBROWSER, "M-Space", 0, do_prev_word_void, 0);
        add_to_sclist(MMOST|MBROWSER, "^Space", 0, do_next_word_void, 0);
        add_to_sclist(MMOST, "^A", 0, do_home, 0);
-- 
2.19.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]