1
1

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

Rename the corresponding rc-file option too, of course.
Этот коммит содержится в:
Benno Schulenberg 2017-07-14 16:06:52 +02:00
родитель f55b65bd99
Коммит 63c428ad08
7 изменённых файлов: 17 добавлений и 13 удалений

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

@ -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
editing source code.
.TP
.BR \-k ", " \-\-cut
.BR \-k ", " \-\-cutfromcursor
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.
.TP

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

@ -299,7 +299,7 @@ Automatically indent new lines to the same number of spaces and tabs as
the previous line.
@item -k
@itemx --cut
@itemx --cutfromcursor
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.
@ -598,7 +598,7 @@ The following global toggles are available:
@kbd{Meta-I} toggles the @option{-i} (@option{--autoindent}) command-line option.
@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
@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.)
Note that this overrides @option{quickblank}.
@item set cut
Use cut-to-end-of-line by default, instead of cutting the whole line.
@item set cutfromcursor
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}
Hard-wrap lines at column number @var{number}. If @var{number} is 0 or less,

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

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

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

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

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

@ -864,7 +864,7 @@ void usage(void)
print_opt("-h", "--help", N_("Show this help text and exit"));
#ifndef NANO_TINY
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
#ifdef ENABLE_LINENUMBERS
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'},
{"atblanks", 0, NULL, 'a'},
{"autoindent", 0, NULL, 'i'},
{"cut", 0, NULL, 'k'},
{"cutfromcursor", 0, NULL, 'k'},
{"unix", 0, NULL, 'u'},
{"softwrap", 0, NULL, '$'},
#endif

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

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

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

@ -7,7 +7,7 @@ comment "#"
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|i?color|extendsyntax).*$"
# 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 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:]]*$)"