今天試著配置vim關于python的設置节吮,在使用YouCompleteMe操作的時候,提示'encoding' is an invalid keyword argument on python files
判耕,查看message,為:
~/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py
中的ReadFile引起的問題:
def ReadFile( filepath ):
with open( filepath, encoding = 'utf8' ) as f:
return f.read()
排查發(fā)現(xiàn)透绩,是因為這段代碼只支持python3,所以需要vim支持python3,用brew install vim --with-python3
解決