1- *eval.txt* For Vim version 8.2. Last change: 2020 Aug 15
1+ *eval.txt* For Vim version 8.2. Last change: 2020 aug 30
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1135,7 +1135,7 @@ In legacy Vim script:
11351135If expr8 is a Number or String this results in a String that contains the
11361136expr1'th single byte from expr8. expr8 is used as a String (a number is
11371137automatically converted to a String), expr1 as a Number. This doesn't
1138- recognize multi-byte encodings, see `byteidx()` for an alternative, or use
1138+ recognize multibyte encodings, see `byteidx()` for an alternative, or use
11391139`split()` to turn the string into a list of characters. Example, to get the
11401140byte under the cursor: >
11411141 :let c = getline(".")[col(".") - 1]
@@ -1163,12 +1163,12 @@ error.
11631163
11641164expr8[expr1a : expr1b] substring or sublist *expr-[:]*
11651165
1166- If expr8 is a String this results in the substring with the bytes from expr1a
1167- to and including expr1b. expr8 is used as a String, expr1a and expr1b are
1168- used as a Number.
1166+ If expr8 is a String this results in the substring with the bytes or
1167+ characters from expr1a to and including expr1b. expr8 is used as a String,
1168+ expr1a and expr1b are used as a Number.
11691169
11701170In legacy Vim script the indexes are byte indexes. This doesn't recognize
1171- multi-byte encodings, see |byteidx()| for computing the indexes. If expr8 is
1171+ multibyte encodings, see |byteidx()| for computing the indexes. If expr8 is
11721172a Number it is first converted to a String.
11731173
11741174In Vim9 script the indexes are character indexes. To use byte indexes use
@@ -1185,6 +1185,7 @@ expr1b is smaller than expr1a the result is an empty string.
11851185
11861186Examples: >
11871187 :let c = name[-1:] " last byte of a string
1188+ :let c = name[0:-1] " the whole string
11881189 :let c = name[-2:-2] " last but one byte of a string
11891190 :let s = line(".")[4:] " from the fifth byte to the end
11901191 :let s = s[:-3] " remove last two bytes
@@ -2359,7 +2360,7 @@ assert_equalfile({fname-one}, {fname-two} [, {msg}])
23592360 Number assert file contents are equal
23602361assert_exception({error} [, {msg}])
23612362 Number assert {error} is in v:exception
2362- assert_fails({cmd} [, {error} [, {msg}]])
2363+ assert_fails({cmd} [, {error} [, {msg} [, {lnum}] ]])
23632364 Number assert {cmd} fails
23642365assert_false({actual} [, {msg}])
23652366 Number assert {actual} is false
@@ -5722,6 +5723,7 @@ getreginfo([{regname}]) *getreginfo()*
57225723 If {regname} is invalid or not set, an empty Dictionary
57235724 will be returned.
57245725 If {regname} is not specified, |v:register| is used.
5726+ The returned Dictionary can be passed to |setreg()|.
57255727
57265728 Can also be used as a |method|: >
57275729 GetRegname()->getreginfo()
@@ -6029,7 +6031,7 @@ has({feature} [, {check}])
60296031 zero otherwise. This is useful to check for a typo in
60306032 {feature} and to detect dead code. Keep in mind that an older
60316033 Vim version will not know about a feature added later and
6032- features that have been abandoned will not be know by the
6034+ features that have been abandoned will not be known by the
60336035 current Vim version.
60346036
60356037 Also see |exists()|.
@@ -8971,7 +8973,7 @@ setcellwidths({list}) *setcellwidths()*
89718973 tells Vim how wide characters are, counted in screen cells.
89728974 This overrides 'ambiwidth'. Example: >
89738975 setcellwidths([[0xad, 0xad, 1],
8974- \ [0x2194, 0x2199, 2]]
8976+ \ [0x2194, 0x2199, 2]])
89758977
89768978< *E1109* *E1110* *E1111* *E1112* *E1113*
89778979 The {list} argument is a list of lists with each three
@@ -8986,6 +8988,8 @@ setcellwidths({list}) *setcellwidths()*
89868988
89878989 To clear the overrides pass an empty list: >
89888990 setcellwidths([]);
8991+ < You can use the script $VIMRUNTIME/tools/emoji_list.vim to see
8992+ the effect for known emoji characters.
89898993
89908994
89918995setcharsearch({dict}) *setcharsearch()*
@@ -11443,7 +11447,7 @@ mouse_urxvt Compiled with support for urxvt mouse.
1144311447mouse_xterm Compiled with support for xterm mouse.
1144411448mouseshape Compiled with support for 'mouseshape'.
1144511449multi_byte Compiled with support for 'encoding' (always true)
11446- multi_byte_encoding 'encoding' is set to a multi-byte encoding.
11450+ multi_byte_encoding 'encoding' is set to a multibyte encoding.
1144711451multi_byte_ime Compiled with support for IME input method.
1144811452multi_lang Compiled with support for multiple languages.
1144911453mzscheme Compiled with MzScheme interface |mzscheme|.
0 commit comments