mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:596a9f29c83a (#26146)
runtime(doc): Fix whitespace and formatting of some help files (vim/vim#13549)
596a9f29c8
N/A patch:
vim-patch:aabca259fa48
Co-authored-by: h_east <h.east.727@gmail.com>
This commit is contained in:
parent
91ef26dece
commit
820823c76d
104
runtime/doc/builtin.txt
generated
104
runtime/doc/builtin.txt
generated
@ -5276,96 +5276,96 @@ printf({fmt}, {expr1} ...) *printf()*
|
|||||||
having a different word order, positional arguments may be
|
having a different word order, positional arguments may be
|
||||||
used to indicate this. For instance: >vim
|
used to indicate this. For instance: >vim
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s returning %s"
|
msgid "%s returning %s"
|
||||||
msgstr "waarde %2$s komt terug van %1$s"
|
msgstr "waarde %2$s komt terug van %1$s"
|
||||||
<
|
<
|
||||||
In this example, the sentence has its 2 string arguments reversed
|
In this example, the sentence has its 2 string arguments
|
||||||
in the output. >vim
|
reversed in the output. >vim
|
||||||
|
|
||||||
echo printf(
|
echo printf(
|
||||||
"In The Netherlands, vim's creator's name is: %1$s %2$s",
|
"In The Netherlands, vim's creator's name is: %1$s %2$s",
|
||||||
"Bram", "Moolenaar")
|
"Bram", "Moolenaar")
|
||||||
< In The Netherlands, vim's creator's name is: Bram Moolenaar >vim
|
< In The Netherlands, vim's creator's name is: Bram Moolenaar >vim
|
||||||
|
|
||||||
echo printf(
|
echo printf(
|
||||||
"In Belgium, vim's creator's name is: %2$s %1$s",
|
"In Belgium, vim's creator's name is: %2$s %1$s",
|
||||||
"Bram", "Moolenaar")
|
"Bram", "Moolenaar")
|
||||||
< In Belgium, vim's creator's name is: Moolenaar Bram
|
< In Belgium, vim's creator's name is: Moolenaar Bram
|
||||||
|
|
||||||
Width (and precision) can be specified using the '*' specifier.
|
Width (and precision) can be specified using the '*' specifier.
|
||||||
In this case, you must specify the field width position in the
|
In this case, you must specify the field width position in the
|
||||||
argument list. >vim
|
argument list. >vim
|
||||||
|
|
||||||
echo printf("%1$*2$.*3$d", 1, 2, 3)
|
echo printf("%1$*2$.*3$d", 1, 2, 3)
|
||||||
< 001 >vim
|
< 001 >vim
|
||||||
echo printf("%2$*3$.*1$d", 1, 2, 3)
|
echo printf("%2$*3$.*1$d", 1, 2, 3)
|
||||||
< 2 >vim
|
< 2 >vim
|
||||||
echo printf("%3$*1$.*2$d", 1, 2, 3)
|
echo printf("%3$*1$.*2$d", 1, 2, 3)
|
||||||
< 03 >vim
|
< 03 >vim
|
||||||
echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
|
echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
|
||||||
< 1.414
|
< 1.414
|
||||||
|
|
||||||
You can mix specifying the width and/or precision directly
|
You can mix specifying the width and/or precision directly
|
||||||
and via positional arguments: >vim
|
and via positional arguments: >vim
|
||||||
|
|
||||||
echo printf("%1$4.*2$f", 1.4142135, 6)
|
echo printf("%1$4.*2$f", 1.4142135, 6)
|
||||||
< 1.414214 >vim
|
< 1.414214 >vim
|
||||||
echo printf("%1$*2$.4f", 1.4142135, 6)
|
echo printf("%1$*2$.4f", 1.4142135, 6)
|
||||||
< 1.4142 >vim
|
< 1.4142 >vim
|
||||||
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
|
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
|
||||||
< 1.41
|
< 1.41
|
||||||
|
|
||||||
*E1500*
|
*E1500*
|
||||||
You cannot mix positional and non-positional arguments: >vim
|
You cannot mix positional and non-positional arguments: >vim
|
||||||
echo printf("%s%1$s", "One", "Two")
|
echo printf("%s%1$s", "One", "Two")
|
||||||
< E1500: Cannot mix positional and non-positional
|
< E1500: Cannot mix positional and non-positional arguments:
|
||||||
arguments: %s%1$s
|
%s%1$s
|
||||||
|
|
||||||
*E1501*
|
*E1501*
|
||||||
You cannot skip a positional argument in a format string: >vim
|
You cannot skip a positional argument in a format string: >vim
|
||||||
echo printf("%3$s%1$s", "One", "Two", "Three")
|
echo printf("%3$s%1$s", "One", "Two", "Three")
|
||||||
< E1501: format argument 2 unused in $-style
|
< E1501: format argument 2 unused in $-style format:
|
||||||
format: %3$s%1$s
|
%3$s%1$s
|
||||||
|
|
||||||
*E1502*
|
*E1502*
|
||||||
You can re-use a [field-width] (or [precision]) argument: >vim
|
You can re-use a [field-width] (or [precision]) argument: >vim
|
||||||
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
|
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
|
||||||
< 1 at width 2 is: 01
|
< 1 at width 2 is: 01
|
||||||
|
|
||||||
However, you can't use it as a different type: >vim
|
However, you can't use it as a different type: >vim
|
||||||
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
|
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
|
||||||
< E1502: Positional argument 2 used as field
|
< E1502: Positional argument 2 used as field width reused as
|
||||||
width reused as different type: long int/int
|
different type: long int/int
|
||||||
|
|
||||||
*E1503*
|
*E1503*
|
||||||
When a positional argument is used, but not the correct number
|
When a positional argument is used, but not the correct number
|
||||||
or arguments is given, an error is raised: >vim
|
or arguments is given, an error is raised: >vim
|
||||||
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
|
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
|
||||||
< E1503: Positional argument 3 out of bounds:
|
< E1503: Positional argument 3 out of bounds: %1$d at width
|
||||||
%1$d at width %2$d is: %01$*2$.*3$d
|
%2$d is: %01$*2$.*3$d
|
||||||
|
|
||||||
Only the first error is reported: >vim
|
Only the first error is reported: >vim
|
||||||
echo printf("%01$*2$.*3$d %4$d", 1, 2)
|
echo printf("%01$*2$.*3$d %4$d", 1, 2)
|
||||||
< E1503: Positional argument 3 out of bounds:
|
< E1503: Positional argument 3 out of bounds: %01$*2$.*3$d
|
||||||
%01$*2$.*3$d %4$d
|
%4$d
|
||||||
|
|
||||||
*E1504*
|
*E1504*
|
||||||
A positional argument can be used more than once: >vim
|
A positional argument can be used more than once: >vim
|
||||||
echo printf("%1$s %2$s %1$s", "One", "Two")
|
echo printf("%1$s %2$s %1$s", "One", "Two")
|
||||||
< One Two One
|
< One Two One
|
||||||
|
|
||||||
However, you can't use a different type the second time: >vim
|
However, you can't use a different type the second time: >vim
|
||||||
echo printf("%1$s %2$s %1$d", "One", "Two")
|
echo printf("%1$s %2$s %1$d", "One", "Two")
|
||||||
< E1504: Positional argument 1 type used
|
< E1504: Positional argument 1 type used inconsistently:
|
||||||
inconsistently: int/string
|
int/string
|
||||||
|
|
||||||
*E1505*
|
*E1505*
|
||||||
Various other errors that lead to a format string being
|
Various other errors that lead to a format string being
|
||||||
wrongly formatted lead to: >vim
|
wrongly formatted lead to: >vim
|
||||||
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
|
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
|
||||||
< E1505: Invalid format specifier:
|
< E1505: Invalid format specifier: %1$d at width %2$d is:
|
||||||
%1$d at width %2$d is: %01$*2$.3$d
|
%01$*2$.3$d
|
||||||
|
|
||||||
*E1507*
|
*E1507*
|
||||||
This internal error indicates that the logic to parse a
|
This internal error indicates that the logic to parse a
|
||||||
|
104
runtime/lua/vim/_meta/vimfn.lua
generated
104
runtime/lua/vim/_meta/vimfn.lua
generated
@ -6261,96 +6261,96 @@ function vim.fn.prevnonblank(lnum) end
|
|||||||
--- having a different word order, positional arguments may be
|
--- having a different word order, positional arguments may be
|
||||||
--- used to indicate this. For instance: >vim
|
--- used to indicate this. For instance: >vim
|
||||||
---
|
---
|
||||||
--- #, c-format
|
--- #, c-format
|
||||||
--- msgid "%s returning %s"
|
--- msgid "%s returning %s"
|
||||||
--- msgstr "waarde %2$s komt terug van %1$s"
|
--- msgstr "waarde %2$s komt terug van %1$s"
|
||||||
--- <
|
--- <
|
||||||
--- In this example, the sentence has its 2 string arguments reversed
|
--- In this example, the sentence has its 2 string arguments
|
||||||
--- in the output. >vim
|
--- reversed in the output. >vim
|
||||||
---
|
---
|
||||||
--- echo printf(
|
--- echo printf(
|
||||||
--- "In The Netherlands, vim's creator's name is: %1$s %2$s",
|
--- "In The Netherlands, vim's creator's name is: %1$s %2$s",
|
||||||
--- "Bram", "Moolenaar")
|
--- "Bram", "Moolenaar")
|
||||||
--- < In The Netherlands, vim's creator's name is: Bram Moolenaar >vim
|
--- < In The Netherlands, vim's creator's name is: Bram Moolenaar >vim
|
||||||
---
|
---
|
||||||
--- echo printf(
|
--- echo printf(
|
||||||
--- "In Belgium, vim's creator's name is: %2$s %1$s",
|
--- "In Belgium, vim's creator's name is: %2$s %1$s",
|
||||||
--- "Bram", "Moolenaar")
|
--- "Bram", "Moolenaar")
|
||||||
--- < In Belgium, vim's creator's name is: Moolenaar Bram
|
--- < In Belgium, vim's creator's name is: Moolenaar Bram
|
||||||
---
|
---
|
||||||
--- Width (and precision) can be specified using the '*' specifier.
|
--- Width (and precision) can be specified using the '*' specifier.
|
||||||
--- In this case, you must specify the field width position in the
|
--- In this case, you must specify the field width position in the
|
||||||
--- argument list. >vim
|
--- argument list. >vim
|
||||||
---
|
---
|
||||||
--- echo printf("%1$*2$.*3$d", 1, 2, 3)
|
--- echo printf("%1$*2$.*3$d", 1, 2, 3)
|
||||||
--- < 001 >vim
|
--- < 001 >vim
|
||||||
--- echo printf("%2$*3$.*1$d", 1, 2, 3)
|
--- echo printf("%2$*3$.*1$d", 1, 2, 3)
|
||||||
--- < 2 >vim
|
--- < 2 >vim
|
||||||
--- echo printf("%3$*1$.*2$d", 1, 2, 3)
|
--- echo printf("%3$*1$.*2$d", 1, 2, 3)
|
||||||
--- < 03 >vim
|
--- < 03 >vim
|
||||||
--- echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
|
--- echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
|
||||||
--- < 1.414
|
--- < 1.414
|
||||||
---
|
---
|
||||||
--- You can mix specifying the width and/or precision directly
|
--- You can mix specifying the width and/or precision directly
|
||||||
--- and via positional arguments: >vim
|
--- and via positional arguments: >vim
|
||||||
---
|
---
|
||||||
--- echo printf("%1$4.*2$f", 1.4142135, 6)
|
--- echo printf("%1$4.*2$f", 1.4142135, 6)
|
||||||
--- < 1.414214 >vim
|
--- < 1.414214 >vim
|
||||||
--- echo printf("%1$*2$.4f", 1.4142135, 6)
|
--- echo printf("%1$*2$.4f", 1.4142135, 6)
|
||||||
--- < 1.4142 >vim
|
--- < 1.4142 >vim
|
||||||
--- echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
|
--- echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
|
||||||
--- < 1.41
|
--- < 1.41
|
||||||
---
|
---
|
||||||
--- *E1500*
|
--- *E1500*
|
||||||
--- You cannot mix positional and non-positional arguments: >vim
|
--- You cannot mix positional and non-positional arguments: >vim
|
||||||
--- echo printf("%s%1$s", "One", "Two")
|
--- echo printf("%s%1$s", "One", "Two")
|
||||||
--- < E1500: Cannot mix positional and non-positional
|
--- < E1500: Cannot mix positional and non-positional arguments:
|
||||||
--- arguments: %s%1$s
|
--- %s%1$s
|
||||||
---
|
---
|
||||||
--- *E1501*
|
--- *E1501*
|
||||||
--- You cannot skip a positional argument in a format string: >vim
|
--- You cannot skip a positional argument in a format string: >vim
|
||||||
--- echo printf("%3$s%1$s", "One", "Two", "Three")
|
--- echo printf("%3$s%1$s", "One", "Two", "Three")
|
||||||
--- < E1501: format argument 2 unused in $-style
|
--- < E1501: format argument 2 unused in $-style format:
|
||||||
--- format: %3$s%1$s
|
--- %3$s%1$s
|
||||||
---
|
---
|
||||||
--- *E1502*
|
--- *E1502*
|
||||||
--- You can re-use a [field-width] (or [precision]) argument: >vim
|
--- You can re-use a [field-width] (or [precision]) argument: >vim
|
||||||
--- echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
|
--- echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
|
||||||
--- < 1 at width 2 is: 01
|
--- < 1 at width 2 is: 01
|
||||||
---
|
---
|
||||||
--- However, you can't use it as a different type: >vim
|
--- However, you can't use it as a different type: >vim
|
||||||
--- echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
|
--- echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
|
||||||
--- < E1502: Positional argument 2 used as field
|
--- < E1502: Positional argument 2 used as field width reused as
|
||||||
--- width reused as different type: long int/int
|
--- different type: long int/int
|
||||||
---
|
---
|
||||||
--- *E1503*
|
--- *E1503*
|
||||||
--- When a positional argument is used, but not the correct number
|
--- When a positional argument is used, but not the correct number
|
||||||
--- or arguments is given, an error is raised: >vim
|
--- or arguments is given, an error is raised: >vim
|
||||||
--- echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
|
--- echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
|
||||||
--- < E1503: Positional argument 3 out of bounds:
|
--- < E1503: Positional argument 3 out of bounds: %1$d at width
|
||||||
--- %1$d at width %2$d is: %01$*2$.*3$d
|
--- %2$d is: %01$*2$.*3$d
|
||||||
---
|
---
|
||||||
--- Only the first error is reported: >vim
|
--- Only the first error is reported: >vim
|
||||||
--- echo printf("%01$*2$.*3$d %4$d", 1, 2)
|
--- echo printf("%01$*2$.*3$d %4$d", 1, 2)
|
||||||
--- < E1503: Positional argument 3 out of bounds:
|
--- < E1503: Positional argument 3 out of bounds: %01$*2$.*3$d
|
||||||
--- %01$*2$.*3$d %4$d
|
--- %4$d
|
||||||
---
|
---
|
||||||
--- *E1504*
|
--- *E1504*
|
||||||
--- A positional argument can be used more than once: >vim
|
--- A positional argument can be used more than once: >vim
|
||||||
--- echo printf("%1$s %2$s %1$s", "One", "Two")
|
--- echo printf("%1$s %2$s %1$s", "One", "Two")
|
||||||
--- < One Two One
|
--- < One Two One
|
||||||
---
|
---
|
||||||
--- However, you can't use a different type the second time: >vim
|
--- However, you can't use a different type the second time: >vim
|
||||||
--- echo printf("%1$s %2$s %1$d", "One", "Two")
|
--- echo printf("%1$s %2$s %1$d", "One", "Two")
|
||||||
--- < E1504: Positional argument 1 type used
|
--- < E1504: Positional argument 1 type used inconsistently:
|
||||||
--- inconsistently: int/string
|
--- int/string
|
||||||
---
|
---
|
||||||
--- *E1505*
|
--- *E1505*
|
||||||
--- Various other errors that lead to a format string being
|
--- Various other errors that lead to a format string being
|
||||||
--- wrongly formatted lead to: >vim
|
--- wrongly formatted lead to: >vim
|
||||||
--- echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
|
--- echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
|
||||||
--- < E1505: Invalid format specifier:
|
--- < E1505: Invalid format specifier: %1$d at width %2$d is:
|
||||||
--- %1$d at width %2$d is: %01$*2$.3$d
|
--- %01$*2$.3$d
|
||||||
---
|
---
|
||||||
--- *E1507*
|
--- *E1507*
|
||||||
--- This internal error indicates that the logic to parse a
|
--- This internal error indicates that the logic to parse a
|
||||||
|
@ -7548,96 +7548,96 @@ M.funcs = {
|
|||||||
having a different word order, positional arguments may be
|
having a different word order, positional arguments may be
|
||||||
used to indicate this. For instance: >vim
|
used to indicate this. For instance: >vim
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s returning %s"
|
msgid "%s returning %s"
|
||||||
msgstr "waarde %2$s komt terug van %1$s"
|
msgstr "waarde %2$s komt terug van %1$s"
|
||||||
<
|
<
|
||||||
In this example, the sentence has its 2 string arguments reversed
|
In this example, the sentence has its 2 string arguments
|
||||||
in the output. >vim
|
reversed in the output. >vim
|
||||||
|
|
||||||
echo printf(
|
echo printf(
|
||||||
"In The Netherlands, vim's creator's name is: %1$s %2$s",
|
"In The Netherlands, vim's creator's name is: %1$s %2$s",
|
||||||
"Bram", "Moolenaar")
|
"Bram", "Moolenaar")
|
||||||
< In The Netherlands, vim's creator's name is: Bram Moolenaar >vim
|
< In The Netherlands, vim's creator's name is: Bram Moolenaar >vim
|
||||||
|
|
||||||
echo printf(
|
echo printf(
|
||||||
"In Belgium, vim's creator's name is: %2$s %1$s",
|
"In Belgium, vim's creator's name is: %2$s %1$s",
|
||||||
"Bram", "Moolenaar")
|
"Bram", "Moolenaar")
|
||||||
< In Belgium, vim's creator's name is: Moolenaar Bram
|
< In Belgium, vim's creator's name is: Moolenaar Bram
|
||||||
|
|
||||||
Width (and precision) can be specified using the '*' specifier.
|
Width (and precision) can be specified using the '*' specifier.
|
||||||
In this case, you must specify the field width position in the
|
In this case, you must specify the field width position in the
|
||||||
argument list. >vim
|
argument list. >vim
|
||||||
|
|
||||||
echo printf("%1$*2$.*3$d", 1, 2, 3)
|
echo printf("%1$*2$.*3$d", 1, 2, 3)
|
||||||
< 001 >vim
|
< 001 >vim
|
||||||
echo printf("%2$*3$.*1$d", 1, 2, 3)
|
echo printf("%2$*3$.*1$d", 1, 2, 3)
|
||||||
< 2 >vim
|
< 2 >vim
|
||||||
echo printf("%3$*1$.*2$d", 1, 2, 3)
|
echo printf("%3$*1$.*2$d", 1, 2, 3)
|
||||||
< 03 >vim
|
< 03 >vim
|
||||||
echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
|
echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
|
||||||
< 1.414
|
< 1.414
|
||||||
|
|
||||||
You can mix specifying the width and/or precision directly
|
You can mix specifying the width and/or precision directly
|
||||||
and via positional arguments: >vim
|
and via positional arguments: >vim
|
||||||
|
|
||||||
echo printf("%1$4.*2$f", 1.4142135, 6)
|
echo printf("%1$4.*2$f", 1.4142135, 6)
|
||||||
< 1.414214 >vim
|
< 1.414214 >vim
|
||||||
echo printf("%1$*2$.4f", 1.4142135, 6)
|
echo printf("%1$*2$.4f", 1.4142135, 6)
|
||||||
< 1.4142 >vim
|
< 1.4142 >vim
|
||||||
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
|
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
|
||||||
< 1.41
|
< 1.41
|
||||||
|
|
||||||
*E1500*
|
*E1500*
|
||||||
You cannot mix positional and non-positional arguments: >vim
|
You cannot mix positional and non-positional arguments: >vim
|
||||||
echo printf("%s%1$s", "One", "Two")
|
echo printf("%s%1$s", "One", "Two")
|
||||||
< E1500: Cannot mix positional and non-positional
|
< E1500: Cannot mix positional and non-positional arguments:
|
||||||
arguments: %s%1$s
|
%s%1$s
|
||||||
|
|
||||||
*E1501*
|
*E1501*
|
||||||
You cannot skip a positional argument in a format string: >vim
|
You cannot skip a positional argument in a format string: >vim
|
||||||
echo printf("%3$s%1$s", "One", "Two", "Three")
|
echo printf("%3$s%1$s", "One", "Two", "Three")
|
||||||
< E1501: format argument 2 unused in $-style
|
< E1501: format argument 2 unused in $-style format:
|
||||||
format: %3$s%1$s
|
%3$s%1$s
|
||||||
|
|
||||||
*E1502*
|
*E1502*
|
||||||
You can re-use a [field-width] (or [precision]) argument: >vim
|
You can re-use a [field-width] (or [precision]) argument: >vim
|
||||||
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
|
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
|
||||||
< 1 at width 2 is: 01
|
< 1 at width 2 is: 01
|
||||||
|
|
||||||
However, you can't use it as a different type: >vim
|
However, you can't use it as a different type: >vim
|
||||||
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
|
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
|
||||||
< E1502: Positional argument 2 used as field
|
< E1502: Positional argument 2 used as field width reused as
|
||||||
width reused as different type: long int/int
|
different type: long int/int
|
||||||
|
|
||||||
*E1503*
|
*E1503*
|
||||||
When a positional argument is used, but not the correct number
|
When a positional argument is used, but not the correct number
|
||||||
or arguments is given, an error is raised: >vim
|
or arguments is given, an error is raised: >vim
|
||||||
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
|
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
|
||||||
< E1503: Positional argument 3 out of bounds:
|
< E1503: Positional argument 3 out of bounds: %1$d at width
|
||||||
%1$d at width %2$d is: %01$*2$.*3$d
|
%2$d is: %01$*2$.*3$d
|
||||||
|
|
||||||
Only the first error is reported: >vim
|
Only the first error is reported: >vim
|
||||||
echo printf("%01$*2$.*3$d %4$d", 1, 2)
|
echo printf("%01$*2$.*3$d %4$d", 1, 2)
|
||||||
< E1503: Positional argument 3 out of bounds:
|
< E1503: Positional argument 3 out of bounds: %01$*2$.*3$d
|
||||||
%01$*2$.*3$d %4$d
|
%4$d
|
||||||
|
|
||||||
*E1504*
|
*E1504*
|
||||||
A positional argument can be used more than once: >vim
|
A positional argument can be used more than once: >vim
|
||||||
echo printf("%1$s %2$s %1$s", "One", "Two")
|
echo printf("%1$s %2$s %1$s", "One", "Two")
|
||||||
< One Two One
|
< One Two One
|
||||||
|
|
||||||
However, you can't use a different type the second time: >vim
|
However, you can't use a different type the second time: >vim
|
||||||
echo printf("%1$s %2$s %1$d", "One", "Two")
|
echo printf("%1$s %2$s %1$d", "One", "Two")
|
||||||
< E1504: Positional argument 1 type used
|
< E1504: Positional argument 1 type used inconsistently:
|
||||||
inconsistently: int/string
|
int/string
|
||||||
|
|
||||||
*E1505*
|
*E1505*
|
||||||
Various other errors that lead to a format string being
|
Various other errors that lead to a format string being
|
||||||
wrongly formatted lead to: >vim
|
wrongly formatted lead to: >vim
|
||||||
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
|
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
|
||||||
< E1505: Invalid format specifier:
|
< E1505: Invalid format specifier: %1$d at width %2$d is:
|
||||||
%1$d at width %2$d is: %01$*2$.3$d
|
%01$*2$.3$d
|
||||||
|
|
||||||
*E1507*
|
*E1507*
|
||||||
This internal error indicates that the logic to parse a
|
This internal error indicates that the logic to parse a
|
||||||
|
Loading…
Reference in New Issue
Block a user