
function! Test() py << EOF import twUtils EOF endfunction 这个是我的 vim script. 我有一个 python 文件 twUtils.p 在同一个目录下面,里面有一个函数,我想在 vim 里面调用这个函数,但是我不知道怎么调用,我试了很多方法都不行,我想知道怎么调用这个函数,谢谢。
1 amlee 2022-10-05 18:51:48 +08:00 你这跟 vim 没关系啊,去看看 python 导包语法吧。 简单说:你在 twUtils.py 下写一个 test.py 文件,然后 test.py 里面写入 from twUtils import xxx |
2 woshichuanqilz OP @amlee 如果外面写一个其他的调用 twUtils.py 的脚本是正常的 |