Update runtime files
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 14
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -5572,6 +5572,10 @@ map({expr1}, {expr2}) *map()*
|
||||
If {expr2} is a |Funcref| it is called with two arguments:
|
||||
1. The key or the index of the current item.
|
||||
2. the value of the current item.
|
||||
With a legacy script lambda you don't get an error if it only
|
||||
accepts one argument, but with a Vim9 lambda you get "E1106:
|
||||
One argument too many", the number of arguments must match.
|
||||
|
||||
The function must return the new value of the item. Example
|
||||
that changes each value by "key-value": >
|
||||
func KeyValue(key, val)
|
||||
@ -7938,29 +7942,38 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()*
|
||||
|
||||
setcellwidths({list}) *setcellwidths()*
|
||||
Specify overrides for cell widths of character ranges. This
|
||||
tells Vim how wide characters are, counted in screen cells.
|
||||
This overrides 'ambiwidth'. Example: >
|
||||
setcellwidths([[0xad, 0xad, 1],
|
||||
\ [0x2194, 0x2199, 2]])
|
||||
tells Vim how wide characters are when displayed in the
|
||||
terminal, counted in screen cells. The values override
|
||||
'ambiwidth'. Example: >
|
||||
call setcellwidths([
|
||||
\ [0x111, 0x111, 1],
|
||||
\ [0x2194, 0x2199, 2],
|
||||
\ ])
|
||||
|
||||
< *E1109* *E1110* *E1111* *E1112* *E1113* *E1114*
|
||||
The {list} argument is a list of lists with each three
|
||||
numbers. These three numbers are [low, high, width]. "low"
|
||||
and "high" can be the same, in which case this refers to one
|
||||
character. Otherwise it is the range of characters from "low"
|
||||
to "high" (inclusive). "width" is either 1 or 2, indicating
|
||||
the character width in screen cells.
|
||||
An error is given if the argument is invalid, also when a
|
||||
range overlaps with another.
|
||||
< The {list} argument is a List of Lists with each three
|
||||
numbers: [{low}, {high}, {width}]. *E1109* *E1110*
|
||||
{low} and {high} can be the same, in which case this refers to
|
||||
one character. Otherwise it is the range of characters from
|
||||
{low} to {high} (inclusive). *E1111* *E1114*
|
||||
Only characters with value 0x100 and higher can be used.
|
||||
|
||||
{width} must be either 1 or 2, indicating the character width
|
||||
in screen cells. *E1112*
|
||||
An error is given if the argument is invalid, also when a
|
||||
range overlaps with another. *E1113*
|
||||
|
||||
If the new value causes 'fillchars' or 'listchars' to become
|
||||
invalid it is rejected and an error is given.
|
||||
|
||||
To clear the overrides pass an empty list: >
|
||||
To clear the overrides pass an empty {list}: >
|
||||
setcellwidths([]);
|
||||
|
||||
< You can use the script $VIMRUNTIME/tools/emoji_list.vim to see
|
||||
the effect for known emoji characters.
|
||||
the effect for known emoji characters. Move the cursor
|
||||
through the text to check if the cell widths of your terminal
|
||||
match with what Vim knows about each emoji. If it doesn't
|
||||
look right you need to adjust the {list} argument.
|
||||
|
||||
|
||||
setcharpos({expr}, {list}) *setcharpos()*
|
||||
Same as |setpos()| but uses the specified column number as the
|
||||
|
||||
Reference in New Issue
Block a user