nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] [PATCH] bindings: reassign M-| to 'cutwordleft' by default


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH] bindings: reassign M-| to 'cutwordleft' by default
Date: Mon, 30 Jul 2018 20:02:54 +0200

The 'cutwordright' function has gotten ^Delete as its default binding;
the 'cutwordleft' function needs a default binding too, if only to keep
the items on the two help lines nicely paired.  M-| is chosen because
it is close to the Backspace key on many keyboard layouts.
---
 src/global.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/global.c b/src/global.c
index 9e24d5a3..5142cf47 100644
--- a/src/global.c
+++ b/src/global.c
@@ -1131,7 +1131,6 @@ void shortcut_init(void)
        add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "PgDn", KEY_NPAGE, 
do_page_down, 0);
        add_to_sclist(MMAIN|MHELP, "M-\\", 0, to_first_line, 0);
        add_to_sclist(MMAIN|MHELP, "^Home", CONTROL_HOME, to_first_line, 0);
-       add_to_sclist(MMAIN|MHELP, "M-|", 0, to_first_line, 0);
        add_to_sclist(MMAIN|MHELP, "M-/", 0, to_last_line, 0);
        add_to_sclist(MMAIN|MHELP, "^End", CONTROL_END, to_last_line, 0);
        add_to_sclist(MMAIN|MHELP, "M-?", 0, to_last_line, 0);
@@ -1153,6 +1152,7 @@ void shortcut_init(void)
        add_to_sclist(MMAIN, "M-;", 0, run_macro, 0);
        add_to_sclist(MMAIN, "M-U", 0, do_undo, 0);
        add_to_sclist(MMAIN, "M-E", 0, do_redo, 0);
+       add_to_sclist(MMAIN, "M-|", 0, do_cut_prev_word, 0);
        add_to_sclist(MMAIN, "^Del", CONTROL_DELETE, do_cut_next_word, 0);
 #endif
 #ifdef ENABLE_WORDCOMPLETION
-- 
2.17.1




reply via email to

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