|
1 |
| -*builtin.txt* For Vim version 9.0. Last change: 2023 Sep 27 |
| 1 | +*builtin.txt* For Vim version 9.0. Last change: 2023 Nov 20 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -4008,8 +4008,8 @@ getqflist([{what}]) *getqflist()*
|
4008 | 4008 | text description of the error
|
4009 | 4009 | type type of the error, 'E', '1', etc.
|
4010 | 4010 | valid |TRUE|: recognized error message
|
4011 |
| - user_data |
4012 |
| - custom data associated with the item, can be |
| 4011 | + user_data |
| 4012 | + custom data associated with the item, can be |
4013 | 4013 | any type.
|
4014 | 4014 |
|
4015 | 4015 | When there is no error list or it's empty, an empty list is
|
@@ -6793,96 +6793,96 @@ printf({fmt}, {expr1} ...) *printf()*
|
6793 | 6793 | having a different word order, positional arguments may be
|
6794 | 6794 | used to indicate this. For instance: >
|
6795 | 6795 |
|
6796 |
| - #, c-format |
6797 |
| - msgid "%s returning %s" |
6798 |
| - msgstr "waarde %2$s komt terug van %1$s" |
| 6796 | + #, c-format |
| 6797 | + msgid "%s returning %s" |
| 6798 | + msgstr "waarde %2$s komt terug van %1$s" |
6799 | 6799 | <
|
6800 |
| - In this example, the sentence has its 2 string arguments reversed |
6801 |
| - in the output. > |
| 6800 | + In this example, the sentence has its 2 string arguments |
| 6801 | + reversed in the output. > |
6802 | 6802 |
|
6803 |
| - echo printf( |
6804 |
| - "In The Netherlands, vim's creator's name is: %1$s %2$s", |
6805 |
| - "Bram", "Moolenaar") |
6806 |
| -< In The Netherlands, vim's creator's name is: Bram Moolenaar > |
| 6803 | + echo printf( |
| 6804 | + "In The Netherlands, vim's creator's name is: %1$s %2$s", |
| 6805 | + "Bram", "Moolenaar") |
| 6806 | +< In The Netherlands, vim's creator's name is: Bram Moolenaar > |
6807 | 6807 |
|
6808 |
| - echo printf( |
6809 |
| - "In Belgium, vim's creator's name is: %2$s %1$s", |
6810 |
| - "Bram", "Moolenaar") |
6811 |
| -< In Belgium, vim's creator's name is: Moolenaar Bram |
| 6808 | + echo printf( |
| 6809 | + "In Belgium, vim's creator's name is: %2$s %1$s", |
| 6810 | + "Bram", "Moolenaar") |
| 6811 | +< In Belgium, vim's creator's name is: Moolenaar Bram |
6812 | 6812 |
|
6813 | 6813 | Width (and precision) can be specified using the '*' specifier.
|
6814 | 6814 | In this case, you must specify the field width position in the
|
6815 | 6815 | argument list. >
|
6816 | 6816 |
|
6817 |
| - echo printf("%1$*2$.*3$d", 1, 2, 3) |
6818 |
| -< 001 > |
6819 |
| - echo printf("%2$*3$.*1$d", 1, 2, 3) |
6820 |
| -< 2 > |
6821 |
| - echo printf("%3$*1$.*2$d", 1, 2, 3) |
6822 |
| -< 03 > |
6823 |
| - echo printf("%1$*2$.*3$g", 1.4142, 2, 3) |
6824 |
| -< 1.414 |
| 6817 | + echo printf("%1$*2$.*3$d", 1, 2, 3) |
| 6818 | +< 001 > |
| 6819 | + echo printf("%2$*3$.*1$d", 1, 2, 3) |
| 6820 | +< 2 > |
| 6821 | + echo printf("%3$*1$.*2$d", 1, 2, 3) |
| 6822 | +< 03 > |
| 6823 | + echo printf("%1$*2$.*3$g", 1.4142, 2, 3) |
| 6824 | +< 1.414 |
6825 | 6825 |
|
6826 | 6826 | You can mix specifying the width and/or precision directly
|
6827 | 6827 | and via positional arguments: >
|
6828 | 6828 |
|
6829 |
| - echo printf("%1$4.*2$f", 1.4142135, 6) |
6830 |
| -< 1.414214 > |
6831 |
| - echo printf("%1$*2$.4f", 1.4142135, 6) |
6832 |
| -< 1.4142 > |
6833 |
| - echo printf("%1$*2$.*3$f", 1.4142135, 6, 2) |
6834 |
| -< 1.41 |
| 6829 | + echo printf("%1$4.*2$f", 1.4142135, 6) |
| 6830 | +< 1.414214 > |
| 6831 | + echo printf("%1$*2$.4f", 1.4142135, 6) |
| 6832 | +< 1.4142 > |
| 6833 | + echo printf("%1$*2$.*3$f", 1.4142135, 6, 2) |
| 6834 | +< 1.41 |
6835 | 6835 |
|
6836 | 6836 | *E1500*
|
6837 | 6837 | You cannot mix positional and non-positional arguments: >
|
6838 |
| - echo printf("%s%1$s", "One", "Two") |
6839 |
| -< E1500: Cannot mix positional and non-positional |
6840 |
| - arguments: %s%1$s |
| 6838 | + echo printf("%s%1$s", "One", "Two") |
| 6839 | +< E1500: Cannot mix positional and non-positional arguments: |
| 6840 | + %s%1$s |
6841 | 6841 |
|
6842 | 6842 | *E1501*
|
6843 | 6843 | You cannot skip a positional argument in a format string: >
|
6844 |
| - echo printf("%3$s%1$s", "One", "Two", "Three") |
6845 |
| -< E1501: format argument 2 unused in $-style |
6846 |
| - format: %3$s%1$s |
| 6844 | + echo printf("%3$s%1$s", "One", "Two", "Three") |
| 6845 | +< E1501: format argument 2 unused in $-style format: |
| 6846 | + %3$s%1$s |
6847 | 6847 |
|
6848 | 6848 | *E1502*
|
6849 | 6849 | You can re-use a [field-width] (or [precision]) argument: >
|
6850 |
| - echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2) |
6851 |
| -< 1 at width 2 is: 01 |
| 6850 | + echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2) |
| 6851 | +< 1 at width 2 is: 01 |
6852 | 6852 |
|
6853 | 6853 | However, you can't use it as a different type: >
|
6854 |
| - echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2) |
6855 |
| -< E1502: Positional argument 2 used as field |
6856 |
| - width reused as different type: long int/int |
| 6854 | + echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2) |
| 6855 | +< E1502: Positional argument 2 used as field width reused as |
| 6856 | + different type: long int/int |
6857 | 6857 |
|
6858 | 6858 | *E1503*
|
6859 | 6859 | When a positional argument is used, but not the correct number
|
6860 | 6860 | or arguments is given, an error is raised: >
|
6861 |
| - echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2) |
6862 |
| -< E1503: Positional argument 3 out of bounds: |
6863 |
| - %1$d at width %2$d is: %01$*2$.*3$d |
| 6861 | + echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2) |
| 6862 | +< E1503: Positional argument 3 out of bounds: %1$d at width |
| 6863 | + %2$d is: %01$*2$.*3$d |
6864 | 6864 |
|
6865 | 6865 | Only the first error is reported: >
|
6866 |
| - echo printf("%01$*2$.*3$d %4$d", 1, 2) |
6867 |
| -< E1503: Positional argument 3 out of bounds: |
6868 |
| - %01$*2$.*3$d %4$d |
| 6866 | + echo printf("%01$*2$.*3$d %4$d", 1, 2) |
| 6867 | +< E1503: Positional argument 3 out of bounds: %01$*2$.*3$d |
| 6868 | + %4$d |
6869 | 6869 |
|
6870 | 6870 | *E1504*
|
6871 | 6871 | A positional argument can be used more than once: >
|
6872 |
| - echo printf("%1$s %2$s %1$s", "One", "Two") |
6873 |
| -< One Two One |
| 6872 | + echo printf("%1$s %2$s %1$s", "One", "Two") |
| 6873 | +< One Two One |
6874 | 6874 |
|
6875 | 6875 | However, you can't use a different type the second time: >
|
6876 |
| - echo printf("%1$s %2$s %1$d", "One", "Two") |
6877 |
| -< E1504: Positional argument 1 type used |
6878 |
| - inconsistently: int/string |
| 6876 | + echo printf("%1$s %2$s %1$d", "One", "Two") |
| 6877 | +< E1504: Positional argument 1 type used inconsistently: |
| 6878 | + int/string |
6879 | 6879 |
|
6880 | 6880 | *E1505*
|
6881 | 6881 | Various other errors that lead to a format string being
|
6882 | 6882 | wrongly formatted lead to: >
|
6883 |
| - echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2) |
6884 |
| -< E1505: Invalid format specifier: |
6885 |
| - %1$d at width %2$d is: %01$*2$.3$d |
| 6883 | + echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2) |
| 6884 | +< E1505: Invalid format specifier: %1$d at width %2$d is: |
| 6885 | + %01$*2$.3$d |
6886 | 6886 |
|
6887 | 6887 | *E1507*
|
6888 | 6888 | This internal error indicates that the logic to parse a
|
@@ -10177,8 +10177,8 @@ type({expr}) The result is a Number representing the type of {expr}.
|
10177 | 10177 | Job: 8 |v:t_job|
|
10178 | 10178 | Channel: 9 |v:t_channel|
|
10179 | 10179 | Blob: 10 |v:t_blob|
|
10180 |
| - Class 12 |v:t_class| |
10181 |
| - Object 13 |v:t_object| |
| 10180 | + Class: 12 |v:t_class| |
| 10181 | + Object: 13 |v:t_object| |
10182 | 10182 | For backward compatibility, this method can be used: >
|
10183 | 10183 | :if type(myvar) == type(0)
|
10184 | 10184 | :if type(myvar) == type("")
|
|
0 commit comments