options: rename --cut to --cutfromcursor, to be clearer

Rename the corresponding rc-file option too, of course.
master
Benno Schulenberg 2017-07-14 16:06:52 +02:00
parent f55b65bd99
commit 63c428ad08
7 changed files with 17 additions and 13 deletions

View File

@ -188,7 +188,7 @@ Show a summary of the available command-line options and exit.
Indent new lines to the previous line's indentation. Useful when Indent new lines to the previous line's indentation. Useful when
editing source code. editing source code.
.TP .TP
.BR \-k ", " \-\-cut .BR \-k ", " \-\-cutfromcursor
Make the 'Cut Text' command (normally \fB^K\fR) cut from the current cursor Make the 'Cut Text' command (normally \fB^K\fR) cut from the current cursor
position to the end of the line, instead of cutting the entire line. position to the end of the line, instead of cutting the entire line.
.TP .TP

View File

@ -299,7 +299,7 @@ Automatically indent new lines to the same number of spaces and tabs as
the previous line. the previous line.
@item -k @item -k
@itemx --cut @itemx --cutfromcursor
Make the 'Cut Text' command (normally @kbd{^K}) cut from the current cursor Make the 'Cut Text' command (normally @kbd{^K}) cut from the current cursor
position to the end of the line, instead of cutting the entire line. position to the end of the line, instead of cutting the entire line.
@ -598,7 +598,7 @@ The following global toggles are available:
@kbd{Meta-I} toggles the @option{-i} (@option{--autoindent}) command-line option. @kbd{Meta-I} toggles the @option{-i} (@option{--autoindent}) command-line option.
@item Cut From Cursor To End-of-Line toggle @item Cut From Cursor To End-of-Line toggle
@kbd{Meta-K} toggles the @option{-k} (@option{--cut}) command-line option. @kbd{Meta-K} toggles the @option{-k} (@option{--cutfromcursor}) command-line option.
@item Long-Line Wrapping toggle @item Long-Line Wrapping toggle
@kbd{Meta-L} toggles the @option{-w} (@option{--nowrap}) command-line option. @kbd{Meta-L} toggles the @option{-w} (@option{--nowrap}) command-line option.
@ -726,8 +726,9 @@ Constantly display the cursor position on the status bar.
(The old form of this option, @code{set const}, is deprecated.) (The old form of this option, @code{set const}, is deprecated.)
Note that this overrides @option{quickblank}. Note that this overrides @option{quickblank}.
@item set cut @item set cutfromcursor
Use cut-to-end-of-line by default, instead of cutting the whole line. Use cut-from-cursor-to-end-of-line by default, instead of cutting the whole line.
(The old form of this option, @code{set cut}, is deprecated.)
@item set fill @var{number} @item set fill @var{number}
Hard-wrap lines at column number @var{number}. If @var{number} is 0 or less, Hard-wrap lines at column number @var{number}. If @var{number} is 0 or less,

View File

@ -97,8 +97,9 @@ Constantly display the cursor position in the status bar.
(The old form of this option, '\fBset const\fR', is deprecated.) (The old form of this option, '\fBset const\fR', is deprecated.)
This overrides the option \fBquickblank\fR. This overrides the option \fBquickblank\fR.
.TP .TP
.B set cut .B set cutfromcursor
Use cut-to-end-of-line by default, instead of cutting the whole line. Use cut-from-cursor-to-end-of-line by default, instead of cutting the whole line.
(The old form of this option, '\fBset cut\fR', is deprecated.)
.TP .TP
.B set fill \fInumber\fR .B set fill \fInumber\fR
Hard-wrap lines at column number \fInumber\fR. If \fInumber\fR is 0 or less, Hard-wrap lines at column number \fInumber\fR. If \fInumber\fR is 0 or less,

View File

@ -53,8 +53,9 @@
# set constantshow # set constantshow
## (The old form, 'const', is deprecated.) ## (The old form, 'const', is deprecated.)
## Use cut-to-end-of-line by default. ## Use cut-from-cursor-to-end-of-line by default.
# set cut # set cutfromcursor
## (The old form, 'cut', is deprecated.)
## Set the line length for wrapping text and justifying paragraphs. ## Set the line length for wrapping text and justifying paragraphs.
## If the value is 0 or less, the wrapping point will be the screen ## If the value is 0 or less, the wrapping point will be the screen

View File

@ -864,7 +864,7 @@ void usage(void)
print_opt("-h", "--help", N_("Show this help text and exit")); print_opt("-h", "--help", N_("Show this help text and exit"));
#ifndef NANO_TINY #ifndef NANO_TINY
print_opt("-i", "--autoindent", N_("Automatically indent new lines")); print_opt("-i", "--autoindent", N_("Automatically indent new lines"));
print_opt("-k", "--cut", N_("Cut from cursor to end of line")); print_opt("-k", "--cutfromcursor", N_("Cut from cursor to end of line"));
#endif #endif
#ifdef ENABLE_LINENUMBERS #ifdef ENABLE_LINENUMBERS
print_opt("-l", "--linenumbers", N_("Show line numbers in front of the text")); print_opt("-l", "--linenumbers", N_("Show line numbers in front of the text"));
@ -1977,7 +1977,7 @@ int main(int argc, char **argv)
{"wordchars", 1, NULL, 'X'}, {"wordchars", 1, NULL, 'X'},
{"atblanks", 0, NULL, 'a'}, {"atblanks", 0, NULL, 'a'},
{"autoindent", 0, NULL, 'i'}, {"autoindent", 0, NULL, 'i'},
{"cut", 0, NULL, 'k'}, {"cutfromcursor", 0, NULL, 'k'},
{"unix", 0, NULL, 'u'}, {"unix", 0, NULL, 'u'},
{"softwrap", 0, NULL, '$'}, {"softwrap", 0, NULL, '$'},
#endif #endif

View File

@ -96,7 +96,8 @@ static const rcoption rcopts[] = {
{"backupdir", 0}, {"backupdir", 0},
{"backwards", BACKWARDS_SEARCH}, {"backwards", BACKWARDS_SEARCH},
{"casesensitive", CASE_SENSITIVE}, {"casesensitive", CASE_SENSITIVE},
{"cut", CUT_TO_END}, {"cut", CUT_TO_END}, /* deprecated form, remove in 2020 */
{"cutfromcursor", CUT_TO_END},
{"justifytrim", JUSTIFY_TRIM}, {"justifytrim", JUSTIFY_TRIM},
{"locking", LOCKING}, {"locking", LOCKING},
{"matchbrackets", 0}, {"matchbrackets", 0},

View File

@ -7,7 +7,7 @@ comment "#"
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|i?color|extendsyntax).*$" icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|i?color|extendsyntax).*$"
# Keywords # Keywords
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cut|fill[[:space:]]+-?[[:digit:]]+|historylog|justifytrim|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabsize[[:space:]]+[1-9][0-9]*|tabstospaces|tempfile|unix|view|wordbounds)\>" icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cutfromcursor|fill[[:space:]]+-?[[:digit:]]+|historylog|justifytrim|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabsize[[:space:]]+[1-9][0-9]*|tabstospaces|tempfile|unix|view|wordbounds)\>"
icolor yellow "^[[:space:]]*set[[:space:]]+((function|key|number|status|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" icolor yellow "^[[:space:]]*set[[:space:]]+((function|key|number|status|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+" icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+"
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]0-9\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)" icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]0-9\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"