for in结构中的vim脚本很奇怪

for in结构中的vim脚本很奇怪,vim,Vim,我得到: :VaptGet install tab 有人能告诉我为什么command\u list缺少varVim在循环和其他构造中不使用冒号吗: ['install', 'remove'] Error detected while processing function VaptGet: line 4: E121: Undefined variable: command_list: E15: Invalid expression: command_list: tab hello wor

我得到:

:VaptGet install tab

有人能告诉我为什么
command\u list
缺少var

Vim在
循环和其他构造中不使用冒号吗:

['install', 'remove']
Error detected while processing function VaptGet:
line    4:
E121: Undefined variable: command_list:
E15: Invalid expression: command_list:
tab
hello world

是的,你说得对,我把它和python混合在一起,它们非常相似,非常感谢,这需要很长时间才能找到答案
['install', 'remove']
Error detected while processing function VaptGet:
line    4:
E121: Undefined variable: command_list:
E15: Invalid expression: command_list:
tab
hello world
for commands in command_list
    if commands == a:command_arg
        let vapt_command = commands
    endif
endfor