-*eval.txt* For Vim version 9.1. Last change: 2024 Feb 06
+*eval.txt* For Vim version 9.1. Last change: 2024 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar
*list-concatenation*
Two lists can be concatenated with the "+" operator: >
:let longlist = mylist + [5, 6]
+A list can be concatenated with another one in place using the "+=" operator or |extend()|: >
:let mylist += [7, 8]
+ :call extend(mylist, [7, 8])
To prepend or append an item, turn the item into a list by putting [] around
it. To change a list in-place, refer to |list-modification| below.
modified. The value must at least have the number of items in the range: >
:let list[3:5] = [3, 4, 5]
-To add items to a List in-place, you can use the |+=| operator: >
+To add items to a List in-place, you can use the += operator
+|list-concatenation|: >
:let listA = [1, 2]
:let listA += [3, 4]
<