1
1

suspension: leave ^Z unbound by default -- just ^T^Z will suspend nano

Suggest in the documentation how to get a one-keystroke Suspend.
Этот коммит содержится в:
Benno Schulenberg 2021-11-04 10:05:56 +01:00
родитель fab4d0afcb
Коммит d0c2c1e6b9
5 изменённых файлов: 16 добавлений и 8 удалений

Просмотреть файл

@ -328,7 +328,9 @@ Don't show the two help lines at the bottom of the screen.
Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings.
.TP
.BR \-z ", " \-\-suspendable
Obsolete option. Ignored. Suspension is enabled by default.
Obsolete option; ignored. Suspension is enabled by default,
reachable via \fB^T^Z\fR. (If you want a plain \fB^Z\fR to
suspend nano, add \fBbind ^Z suspend main\fR to your nanorc.)
.TP
.BR \-% ", " \-\-stateflags
Use the top-right corner of the screen for showing some state flags:

Просмотреть файл

@ -671,7 +671,9 @@ instead of beginnings.
@item -z
@itemx --suspendable
Obsolete option. Ignored. Suspension is enabled by default.
Obsolete option; ignored. Suspension is enabled by default,
reachable via @kbd{^T^Z}. (If you want a plain @kbd{^Z} to
suspend nano, add @code{bind ^Z suspend main} to your nanorc.)
@item -%
@itemx --stateflags
@ -1093,7 +1095,9 @@ Use this color combination for the vertical guiding stripe.
@xref{@code{set keycolor}} for valid color names.
@item set suspendable
Obsolete option. Ignored. Suspension is enabled by default.
Obsolete option; ignored. Suspension is enabled by default,
reachable via @kbd{^T^Z}. (If you want a plain @kbd{^Z} to
suspend nano, add @code{bind ^Z suspend main} to your nanorc.)
@item set tabsize @var{number}
Use a tab size of @var{number} columns. The value of @var{number} must be

Просмотреть файл

@ -339,7 +339,9 @@ Use this color combination for the vertical guiding stripe.
See \fBset titlecolor\fR for more details.
.TP
.B set suspendable
Obsolete option. Ignored. Suspension is enabled by default.
Obsolete option; ignored. Suspension is enabled by default,
reachable via \fB^T^Z\fR. (If you want a plain \fB^Z\fR to
suspend nano, add \fBbind ^Z suspend main\fR to your nanorc.)
.TP
.B set tabsize \fInumber\fR
Use a tab size of \fInumber\fR columns. The value of \fInumber\fP must be

Просмотреть файл

@ -252,6 +252,9 @@
## === Key bindings ===
## For all details, see 'man nanorc', section REBINDING KEYS.
## If you want to suspend nano with one keystroke (instead of with ^T^Z):
# bind ^Z suspend main
## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor.
## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is
## the ASCII character for backspace, so it is bound by default to the
@ -272,9 +275,6 @@
# unbind M-T main
## (Those functions are still accessible through ^T^J and ^T^V.)
## If you sometimes hit ^Z by accident (you can still suspend with ^T^Z):
# unbind ^Z main
## For quickly uppercasing or lowercasing the word under the cursor.
## (These effectively do a Ctrl+Right followed by a Shift+Ctrl+Left,
## and then pipe the selected text through a sed command.)

Просмотреть файл

@ -1334,6 +1334,7 @@ void shortcut_init(void)
#ifndef NANO_TINY
add_to_sclist(MMAIN, "M-T", 0, cut_till_eof, 0);
add_to_sclist(MEXECUTE, "^V", 0, cut_till_eof, 0);
add_to_sclist(MEXECUTE, "^Z", 0, do_suspend_void, 0);
add_to_sclist(MMAIN, "M-D", 0, count_lines_words_and_characters, 0);
#else
add_to_sclist(MMAIN, "M-H", 0, do_help, 0);
@ -1349,7 +1350,6 @@ void shortcut_init(void)
add_to_sclist(MMOST|MBROWSER|MHELP|MYESNO, "^L", 0, full_refresh, 0);
else
add_to_sclist(MMOST|MBROWSER|MYESNO, "^L", 0, full_refresh, 0);
add_to_sclist(MMAIN|MEXECUTE, "^Z", 0, do_suspend_void, 0);
#ifndef NANO_TINY
/* Group of "Appearance" toggles. */