1- *eval.txt* For Vim version 9.1. Last change: 2025 Sep 15
1+ *eval.txt* For Vim version 9.1. Last change: 2025 Sep 25
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3138,9 +3138,12 @@ declarations and assignments do not use a command. |vim9-declaration|
31383138 set and an environment variable that is empty.
31393139
31403140:let ${env-name} .= {expr1}
3141+ :let ${env-name} ..= {expr1}
31413142 Append {expr1} to the environment variable {env-name} .
31423143 If the environment variable didn't exist yet this
31433144 works like "=".
3145+ `.= ` is not supported with Vim script version 2 and
3146+ later, see | vimscript-version | .
31443147
31453148:let @{reg-name} = {expr1} *:let-register* *:let-@*
31463149 Write the result of the expression {expr1} in register
@@ -3157,8 +3160,11 @@ declarations and assignments do not use a command. |vim9-declaration|
31573160 that would match everywhere.
31583161
31593162:let @{reg-name} .= {expr1}
3163+ :let @{reg-name} ..= {expr1}
31603164 Append {expr1} to register {reg-name} . If the
31613165 register was empty it's like setting it to {expr1} .
3166+ `.= ` is not supported with Vim script version 2 and
3167+ later, see | vimscript-version | .
31623168
31633169:let &{option-name} = {expr1} *:let-option* *:let-&*
31643170 Set option {option-name} to the result of the
@@ -3176,27 +3182,37 @@ declarations and assignments do not use a command. |vim9-declaration|
31763182 a terminal key code, there is no error.
31773183
31783184:let &{option-name} .= {expr1}
3185+ :let &{option-name} ..= {expr1}
31793186 For a string option: Append {expr1} to the value.
31803187 Does not insert a comma like | :set+= | .
3188+ `.= ` is not supported with Vim script version 2 and
3189+ later, see | vimscript-version | .
31813190
31823191:let &{option-name} += {expr1}
31833192:let &{option-name} -= {expr1}
31843193 For a number or boolean option: Add or subtract
31853194 {expr1} .
31863195
31873196:let &l:{option-name} = {expr1}
3188- :let &l:{option-name} .= {expr1}
31893197:let &l:{option-name} += {expr1}
31903198:let &l:{option-name} -= {expr1}
3199+ :let &l:{option-name} .= {expr1}
3200+ :let &l:{option-name} ..= {expr1}
31913201 Like above, but only set the local value of an option
31923202 (if there is one). Works like | :setlocal | .
3203+ `.= ` is not supported with Vim script version 2 and
3204+ later, see | vimscript-version | .
31933205
31943206:let &g:{option-name} = {expr1}
3195- :let &g:{option-name} .= {expr1}
31963207:let &g:{option-name} += {expr1}
31973208:let &g:{option-name} -= {expr1}
3209+ :let &g:{option-name} .= {expr1}
3210+ :let &g:{option-name} ..= {expr1}
31983211 Like above, but only set the global value of an option
31993212 (if there is one). Works like | :setglobal | .
3213+ `.= ` is not supported with Vim script version 2 and
3214+ later, see | vimscript-version | .
3215+
32003216 *E1093* *E1537* *E1538* *E1535*
32013217:let [{name1} , {name2} , ...] = {expr1} *:let-unpack* *E687* *E688*
32023218 {expr1} must evaluate to a | List | or a | Tuple | . The
@@ -3217,15 +3233,18 @@ declarations and assignments do not use a command. |vim9-declaration|
32173233 :echo x
32183234< The result is [0, 2].
32193235
3220- :let [{name1} , {name2} , ...] .= {expr1}
32213236:let [{name1} , {name2} , ...] += {expr1}
32223237:let [{name1} , {name2} , ...] -= {expr1}
32233238:let [{name1} , {name2} , ...] *= {expr1}
32243239:let [{name1} , {name2} , ...] /= {expr1}
32253240:let [{name1} , {name2} , ...] %= {expr1}
3226- Like above, but append, add, subtract, multiply,
3227- divide, or modulo the value for each | List | or | Tuple |
3241+ :let [{name1} , {name2} , ...] .= {expr1}
3242+ :let [{name1} , {name2} , ...] ..= {expr1}
3243+ Like above, but add, subtract, multiply, divide,
3244+ modulo, or append the value for each | List | or | Tuple |
32283245 item.
3246+ `.= ` is not supported with Vim script version 2 and
3247+ later, see | vimscript-version | .
32293248
32303249:let [{name} , ..., ; {lastname} ] = {expr1} *E452*
32313250 Like | :let-unpack | above, but the | List | or | Tuple |
@@ -3237,11 +3256,14 @@ declarations and assignments do not use a command. |vim9-declaration|
32373256 :let [a, b; rest] = ["aval", "bval", 3, 4]
32383257 :let [a, b; rest] = ("aval", "bval", 3, 4)
32393258<
3240- :let [{name} , ..., ; {lastname} ] .= {expr1}
32413259:let [{name} , ..., ; {lastname} ] += {expr1}
32423260:let [{name} , ..., ; {lastname} ] -= {expr1}
3243- Like above, but append/add/subtract the value for each
3261+ :let [{name} , ..., ; {lastname} ] .= {expr1}
3262+ :let [{name} , ..., ; {lastname} ] ..= {expr1}
3263+ Like above, but add/subtract/append the value for each
32443264 | List | item.
3265+ `.= ` is not supported with Vim script version 2 and
3266+ later, see | vimscript-version | .
32453267
32463268 *:let=<<* *:let-heredoc*
32473269 *E990* *E991* *E172* *E221* *E1145*
@@ -4145,7 +4167,7 @@ exception most recently caught as long it is not finished.
41454167
41464168 :function! Caught()
41474169 : if v:exception != ""
4148- : echo 'Caught "' . v:exception .. '" in ' .. v:throwpoint
4170+ : echo 'Caught "' .. v:exception .. '" in ' .. v:throwpoint
41494171 : else
41504172 : echo 'Nothing caught'
41514173 : endif
0 commit comments