最近安装了YCM插件,出现了下面的报错:
Error detected while processing function youcompleteme#Enable[3]..<SNR>35_SetUpPython:
line 42:
/must>not&exist/foo:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
解决办法:
在.vimrc文件的最上面添加下面的配置就可以一劳永逸:
if has('python3')
silent! python3 1
endif
参考: