commit bfe65af6f3445ec60adb7cdb225c221e80ee6b9c
parent 46f5d51fb582be6f924c266314659e41c2f4de98
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 13 Jul 2018 13:57:06 +0200
bindings: bind M-Q to 'findprevious' by default, and M-W to 'findnext'
This makes things symmetrical: ^W starts a forward search, ^Q starts
a backward search, M-W searches the next occurrence forward, and M-Q
searches the next occurrence backward.
The Tabs-To-Spaces toggle is moved to M-O, and thus the More-Space
toggle is no longer bound by default.
Diffstat:
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/doc/nano.texi b/doc/nano.texi
@@ -623,15 +623,12 @@ The following global toggles are available:
@item No Conversion From DOS/Mac Format
@kbd{Meta-N} toggles the @option{-N} (@option{--noconvert}) command-line option.
-@item More Space For Editing
-@kbd{Meta-O} toggles the @option{-O} (@option{--morespace}) command-line option.
+@item Tabs To Spaces
+@kbd{Meta-O} toggles the @option{-E} (@option{--tabstospaces}) command-line option.
@item Whitespace Display
@kbd{Meta-P} toggles the displaying of whitespace (@pxref{Whitespace}).
-@item Tabs To Spaces
-@kbd{Meta-Q} toggles the @option{-E} (@option{--tabstospaces}) command-line option.
-
@item Smooth Scrolling
@kbd{Meta-S} toggles the @option{-S} (@option{--smooth}) command-line option.
diff --git a/src/global.c b/src/global.c
@@ -1142,7 +1142,9 @@ void shortcut_init(void)
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);
- add_to_sclist(MMAIN|MHELP|MBROWSER, "M-W", 0, do_research, 0);
+ add_to_sclist(MMAIN, "M-W", 0, do_findnext, 0);
+ add_to_sclist(MMAIN, "M-Q", 0, do_findprevious, 0);
+ add_to_sclist(MHELP|MBROWSER, "M-W", 0, do_research, 0);
add_to_sclist(MMAIN|MHELP|MBROWSER, "F16", 0, do_research, 0);
#ifndef NANO_TINY
add_to_sclist(MMAIN, "M-]", 0, do_find_bracket, 0);
@@ -1248,7 +1250,7 @@ void shortcut_init(void)
/* Group of "Appearance" toggles. */
add_to_sclist(MMAIN, "M-X", 0, do_toggle_void, NO_HELP);
add_to_sclist(MMAIN, "M-C", 0, do_toggle_void, CONSTANT_SHOW);
- add_to_sclist(MMAIN, "M-O", 0, do_toggle_void, MORE_SPACE);
+ add_to_sclist(MMAIN, "", 0, do_toggle_void, MORE_SPACE);
add_to_sclist(MMAIN, "M-S", 0, do_toggle_void, SMOOTH_SCROLL);
add_to_sclist(MMAIN, "M-$", 0, do_toggle_void, SOFTWRAP);
#ifdef ENABLE_LINENUMBERS
@@ -1266,7 +1268,7 @@ void shortcut_init(void)
#ifdef ENABLE_WRAPPING
add_to_sclist(MMAIN, "M-L", 0, do_toggle_void, NO_WRAP);
#endif
- add_to_sclist(MMAIN, "M-Q", 0, do_toggle_void, TABS_TO_SPACES);
+ add_to_sclist(MMAIN, "M-O", 0, do_toggle_void, TABS_TO_SPACES);
/* Group of "Peripheral-feature" toggles. */
add_to_sclist(MMAIN, "M-B", 0, do_toggle_void, BACKUP_FILE);