最近安裝了YCM插件,出現(xiàn)了下面的報(bào)錯(cuò):
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
參考: