bindings: rename 'cutwordleft' to 'chopwordleft', and similar for right

These bindable functions should not connote cutting, as they don't put
anything into the cutbuffer.
master
Benno Schulenberg 2019-02-24 17:04:17 +01:00
parent 15c3e924b8
commit 2c7d336711
4 changed files with 9 additions and 7 deletions

View File

@ -1183,13 +1183,13 @@ current cursor position.
Throws away the current line (or the marked region).
(This function is bound by default to <Meta+Delete>.)
@item cutwordleft
@item chopwordleft
Deletes from the cursor position to the beginning of the preceding word.
(This function is bound by default to <Shift+Ctrl+Delete>. If your terminal
produces @code{^H} for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete
the word to the left of the cursor by rebinding ^H to this function.)
@item cutwordright
@item chopwordright
Deletes from the cursor position to the beginning of the next word.
(This function is bound by default to <Ctrl+Delete>.)

View File

@ -524,13 +524,13 @@ current cursor position.
Throws away the current line (or the marked region).
(This function is bound by default to <Meta+Delete>.)
.TP
.B cutwordleft
.B chopwordleft
Deletes from the cursor position to the beginning of the preceding word.
(This function is bound by default to <Shift+Ctrl+Delete>. If your terminal
produces \fB^H\fR for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete
the word to the left of the cursor by rebinding ^H to this function.)
.TP
.B cutwordright
.B chopwordright
Deletes from the cursor position to the beginning of the next word.
(This function is bound by default to <Ctrl+Delete>.)
.TP

View File

@ -270,7 +270,7 @@
## keycode, which is hard-bound to the backspace function. So, if you
## normally use <Backspace> for backspacing and not ^H, you can make
## <Ctrl+Backspace> delete the word to the left of the cursor with:
# bind ^H cutwordleft main
# bind ^H chopwordleft main
## If you would like nano to have keybindings that are more "usual",
## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,

View File

@ -1519,9 +1519,11 @@ sc *strtosc(const char *input)
s->func = do_indent;
else if (!strcasecmp(input, "unindent"))
s->func = do_unindent;
else if (!strcasecmp(input, "cutwordleft"))
else if (!strcasecmp(input, "chopwordleft") ||
!strcasecmp(input, "cutwordleft")) /* Deprecated; remove in 2020. */
s->func = do_cut_prev_word;
else if (!strcasecmp(input, "cutwordright"))
else if (!strcasecmp(input, "chopwordright") ||
!strcasecmp(input, "cutwordright")) /* Deprecated; remove in 2020. */
s->func = do_cut_next_word;
else if (!strcasecmp(input, "findbracket"))
s->func = do_find_bracket;