Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

让vim支持python3的自动补全 #15

Open
JeffyLu opened this issue Feb 23, 2017 · 2 comments
Open

让vim支持python3的自动补全 #15

JeffyLu opened this issue Feb 23, 2017 · 2 comments

Comments

@JeffyLu
Copy link
Owner

JeffyLu commented Feb 23, 2017

让vim支持python3的自动补全


检查vim版本

  查看vim版本信息,至少要7.4.143以上并且支持python3的版本才行,不符合的可以参考这:Building Vim from source重新安装。

$ vim --version

更新并重新安装YouCompleteMe

$ cd ~/.vim/bundle/YouCompleteMe
$ git pull
$ ./install.py --python-completer

配置.vimrc

添加如下内容:

let g:ycm_python_binary_path = '/usr/bin/python3'
" 具体路径根据自己的python所在位置修改
" 如果要支持python2可以把上面的 'python3' 改成 'python'
" 虚拟环境下也支持,只要路径没问题

references:Valloric/YouCompleteMe/README.md
@ChefZhang
Copy link

找了半天,总算解决了,非常感谢

@shizhu13
Copy link

shizhu13 commented Jan 6, 2019

非常感谢,搞了好几个小时的配置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants