我很高兴使用Powerline for Vim 一段时间,直到今天 Homebrew 安装了从 3.6.5 到 3.7.0 的 Python 升级。从那以后,Powerline 在 Vim 中停止正常工作。
首先,在启动 Vim 时,出现一个错误,提示powerline找不到模块,我想,如果pip为每个 Python 次要版本安装包,这是有道理的。
所以我按照文档中的描述再次安装了这个powerline-status包:pip
pip install powerline-status
现在,ModuleNotFoundError它消失了,我在 Vim 中获得了一条工作电源线,但每次我启动 Vim 时,我都会收到另一个错误消息:
/must>not&exist/foo:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
Press ENTER or type command to continue
而且我必须按 Enter 或任何其他键才能继续,这很烦人。
如果我从我的 中删除以下用于加载 Powerline 的命令(如文档中所述).vimrc,则该命令DeprecationWarning消失了,但显然 Powerline 也消失了......
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup()
python3 del powerline_setup
我搜索了他们的 GitHub 问题,但找不到任何相关内容。
有谁知道这个的解决方案?