Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何获取文件名包含在变量中的 vim 脚本?
就像:source,除了参数不是字符串文字,而是变量名。
:source
您始终可以使用:execute动态构建命令:
:execute
:execute 'source '.fnameescape(myvar)