Update runtime files.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f349dd2..87edd49 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2022 Feb 20
+*eval.txt* For Vim version 8.2. Last change: 2022 Feb 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -470,7 +470,7 @@
:for [i, j; rest] in listlist
: call Doit(i, j)
: if !empty(rest)
- : echo "remainder: " . string(rest)
+ : echo "remainder: " .. string(rest)
: endif
:endfor
@@ -498,11 +498,11 @@
:let list = split("a b c") " create list from items in a string
:let string = join(list, ', ') " create string from list items
:let s = string(list) " String representation of list
- :call map(list, '">> " . v:val') " prepend ">> " to each item
+ :call map(list, '">> " .. v:val') " prepend ">> " to each item
Don't forget that a combination of features can make things simple. For
example, to add up all the numbers in a list: >
- :exe 'let sum = ' . join(nrlist, '+')
+ :exe 'let sum = ' .. join(nrlist, '+')
1.4 Dictionaries ~
@@ -568,7 +568,7 @@
Most often you want to loop over the keys, using the |keys()| function: >
:for key in keys(mydict)
- : echo key . ': ' . mydict[key]
+ : echo key .. ': ' .. mydict[key]
:endfor
The List of keys is unsorted. You may want to sort them first: >
@@ -576,13 +576,13 @@
To loop over the values use the |values()| function: >
:for v in values(mydict)
- : echo "value: " . v
+ : echo "value: " .. v
:endfor
If you want both the key and the value use the |items()| function. It returns
a List in which each item is a List with two items, the key and the value: >
:for [key, value] in items(mydict)
- : echo key . ': ' . value
+ : echo key .. ': ' .. value
:endfor
@@ -677,7 +677,7 @@
:let small = min(dict) " minimum value in dict
:let xs = count(dict, 'x') " count nr of times 'x' appears in dict
:let s = string(dict) " String representation of dict
- :call map(dict, '">> " . v:val') " prepend ">> " to each item
+ :call map(dict, '">> " .. v:val') " prepend ">> " to each item
1.5 Blobs ~
@@ -921,13 +921,13 @@
to avoid running out of stack and crashing. *E1169*
-expr1 *expr1* *trinary* *falsy-operator* *??* *E109*
+expr1 *expr1* *ternary* *falsy-operator* *??* *E109*
-----
-The trinary operator: expr2 ? expr1 : expr1
+The ternary operator: expr2 ? expr1 : expr1
The falsy operator: expr2 ?? expr1
-Trinary operator ~
+Ternary operator ~
In legacy script the expression before the '?' is evaluated to a number. If
it evaluates to |TRUE|, the result is the value of the expression between the
@@ -1530,7 +1530,7 @@
&l:option local option value
Examples: >
- echo "tabstop is " . &tabstop
+ echo "tabstop is " .. &tabstop
if &insertmode
Any option name can be used here. See |options|. When using the local value
@@ -1820,7 +1820,7 @@
echo "script executed for the first time"
else
let s:counter = s:counter + 1
- echo "script executed " . s:counter . " times now"
+ echo "script executed " .. s:counter .. " times now"
endif
Note that this means that filetype plugins don't get a different set of script
@@ -1955,7 +1955,7 @@
*v:count* *count-variable*
v:count The count given for the last Normal mode command. Can be used
to get the count before a mapping. Read-only. Example: >
- :map _x :<C-U>echo "the count is " . v:count<CR>
+ :map _x :<C-U>echo "the count is " .. v:count<CR>
< Note: The <C-U> is required to remove the line range that you
get when typing ':' after a count.
When there are two counts, as in "3d2w", they are multiplied,
@@ -2829,9 +2829,9 @@
: echohl Title
: echo a:title
: echohl None
- : echo a:0 . " items:"
+ : echo a:0 .. " items:"
: for s in a:000
- : echon ' ' . s
+ : echon ' ' .. s
: endfor
:endfunction
@@ -2874,7 +2874,7 @@
this works:
*function-range-example* >
:function Mynumber(arg)
- : echo line(".") . " " . a:arg
+ : echo line(".") .. " " .. a:arg
:endfunction
:1,5call Mynumber(getline("."))
<
@@ -2885,7 +2885,7 @@
Example of a function that handles the range itself: >
:function Cont() range
- : execute (a:firstline + 1) . "," . a:lastline . 's/^/\t\\ '
+ : execute (a:firstline + 1) .. "," .. a:lastline .. 's/^/\t\\ '
:endfunction
:4,8call Cont()
<
@@ -3077,7 +3077,7 @@
This cannot be used to add an item to a |List|.
This cannot be used to set a byte in a String. You
can do that like this: >
- :let var = var[0:2] . 'X' . var[4:]
+ :let var = var[0:2] .. 'X' .. var[4:]
< When {var-name} is a |Blob| then {idx} can be the
length of the blob, in which case one byte is
appended.
@@ -3147,7 +3147,7 @@
is just like using the |:set| command: both the local
value and the global value are changed.
Example: >
- :let &path = &path . ',/usr/local/include'
+ :let &path = &path .. ',/usr/local/include'
< This also works for terminal codes in the form t_xx.
But only for alphanumerical names. Example: >
:let &t_k1 = "\<Esc>[234;"
@@ -3425,6 +3425,8 @@
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
:en[dif] Execute the commands until the next matching ":else"
or ":endif" if {expr1} evaluates to non-zero.
+ Although the short forms work, it is recommended to
+ always use `:endif` to avoid confusion.
From Vim version 4.5 until 5.0, every Ex command in
between the ":if" and ":endif" is ignored. These two
@@ -4028,7 +4030,7 @@
:function! Caught()
: if v:exception != ""
- : echo 'Caught "' . v:exception . '" in ' . v:throwpoint
+ : echo 'Caught "' . v:exception .. '" in ' .. v:throwpoint
: else
: echo 'Nothing caught'
: endif
@@ -4431,8 +4433,8 @@
:catch /^Vim:Interrupt$/
: echo "Script interrupted"
:catch /.*/
- : echo "Internal error (" . v:exception . ")"
- : echo " - occurred at " . v:throwpoint
+ : echo "Internal error (" .. v:exception .. ")"
+ : echo " - occurred at " .. v:throwpoint
:endtry
:" end of script
@@ -4628,7 +4630,7 @@
:function! CheckRange(a, func)
: if a:a < 0
- : throw "EXCEPT:MATHERR:RANGE(" . a:func . ")"
+ : throw "EXCEPT:MATHERR:RANGE(" .. a:func .. ")"
: endif
:endfunction
:
@@ -4655,7 +4657,7 @@
: try
: execute "write" fnameescape(a:file)
: catch /^Vim(write):/
- : throw "EXCEPT:IO(" . getcwd() . ", " . a:file . "):WRITEERR"
+ : throw "EXCEPT:IO(" .. getcwd() .. ", " .. a:file .. "):WRITEERR"
: endtry
:endfunction
:
@@ -4674,9 +4676,9 @@
: let dir = substitute(v:exception, '.*(\(.\+\),\s*.\+).*', '\1', "")
: let file = substitute(v:exception, '.*(.\+,\s*\(.\+\)).*', '\1', "")
: if file !~ '^/'
- : let file = dir . "/" . file
+ : let file = dir .. "/" .. file
: endif
- : echo 'I/O error for "' . file . '"'
+ : echo 'I/O error for "' .. file .. '"'
:
:catch /^EXCEPT/
: echo "Unspecified error"
@@ -4744,7 +4746,7 @@
: echo "inner finally"
: endtry
:catch
- : echo 'outer catch-all caught "' . v:exception . '"'
+ : echo 'outer catch-all caught "' .. v:exception .. '"'
: finally
: echo "outer finally"
:endtry
@@ -4806,7 +4808,7 @@
: let n = a:nr
: let r = ""
: while n
- : let r = '01'[n % 2] . r
+ : let r = '01'[n % 2] .. r
: let n = n / 2
: endwhile
: return r
@@ -4817,7 +4819,7 @@
:func String2Bin(str)
: let out = ''
: for ix in range(strlen(a:str))
- : let out = out . '-' . Nr2Bin(char2nr(a:str[ix]))
+ : let out = out .. '-' .. Nr2Bin(char2nr(a:str[ix]))
: endfor
: return out[1:]
:endfunc