An existing variable cannot be assigned to with `:let`, since that implies a
declaration. Global, window, tab, buffer and Vim variables can only be used
-without `:let`, because they are are not really declared, they can also be
-deleted with `:unlet`.
+without `:let`, because they are not really declared, they can also be deleted
+with `:unlet`.
Variables cannot shadow previously defined variables.
Variables may shadow Ex commands, rename the variable if needed.
|curly-braces-names| cannot be used.
-No :xit, :append, :change or :insert ~
+No :xit, :t, :append, :change or :insert ~
-These commands are too easily confused with local variable names. Instead of
-`:x` or `:xit` you can use `:exit`.
+These commands are too easily confused with local variable names.
+Instead of `:x` or `:xit` you can use `:exit`.
+Instead of `:t` you can use `:copy`.
Comparators ~
enddef
def Test_no_insert_xit()
- call CheckDefExecFailure(['x = 1'], 'E1100:')
call CheckDefExecFailure(['a = 1'], 'E1100:')
- call CheckDefExecFailure(['i = 1'], 'E1100:')
call CheckDefExecFailure(['c = 1'], 'E1100:')
+ call CheckDefExecFailure(['i = 1'], 'E1100:')
+ call CheckDefExecFailure(['t = 1'], 'E1100:')
+ call CheckDefExecFailure(['x = 1'], 'E1100:')
- CheckScriptFailure(['vim9script', 'x = 1'], 'E1100:')
CheckScriptFailure(['vim9script', 'a = 1'], 'E488:')
CheckScriptFailure(['vim9script', 'a'], 'E1100:')
- CheckScriptFailure(['vim9script', 'i = 1'], 'E488:')
- CheckScriptFailure(['vim9script', 'i'], 'E1100:')
CheckScriptFailure(['vim9script', 'c = 1'], 'E488:')
CheckScriptFailure(['vim9script', 'c'], 'E1100:')
+ CheckScriptFailure(['vim9script', 'i = 1'], 'E488:')
+ CheckScriptFailure(['vim9script', 'i'], 'E1100:')
+ CheckScriptFailure(['vim9script', 't'], 'E1100:')
+ CheckScriptFailure(['vim9script', 't = 1'], 'E1100:')
+ CheckScriptFailure(['vim9script', 'x = 1'], 'E1100:')
enddef
def IfElse(what: number): string