在 Arch Linux 的 TAB 补全中未检测到 Vim YouCompleteMe Python 子类 [英] Vim YouCompleteMe Python subclasses are not detected on TAB-completion in Arch Linux

查看:61
本文介绍了在 Arch Linux 的 TAB 补全中未检测到 Vim YouCompleteMe Python 子类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以用 TAB 完成当前打开的文件变量、路径和全局变量,但在 TAB 完成时未检测到我的 python 子类.例如,

I can TAB-complete current open file variables, paths & globals, but my python subclasses are not detected on TAB completion. For instance,

import os          # os is built-in library.
os.                # ycm does not complete members of this class.

我正在寻找解决方案已经 48 小时了.我的/usr/bin/python ->/usr/bin/python2.7,所有测试100%通过,构建成功.

It has been 48h that I'm searching the solution. My /usr/bin/python -> /usr/bin/python2.7, all the tests pass 100% and the build was successful.

> uname -r
4.0.5-1-ARCH

我尝试从存储库安装特定于 Arch Linux 的软件包,但它们似乎不起作用.

I tried installing packages specific to Arch Linux from repositories and they don't seem to work.

此时,我想我最好的机会是在Vundle的原始包YouCompleteMe中找到python路径或具有此用途的变量的位置.然后,我应该能够验证它是否正确.我愿意接受有关此问题的所有可能的解决方案或见解.

At this point, I think my best chance would be to find the place where the python path or a variable with this purpose is set in the original package for Vundle, YouCompleteMe. Then, I should be able to verify that it is correct. I am open to all possible solutions or insights on this issue.

> echo $PYTHONPATH

/usr/lib/python2.7/

感谢您的宝贵时间!

推荐答案

YouCompleteMe 依赖 Jedi-Vim 进行 Python 补全.

YouCompleteMe relies on Jedi-Vim for python completion.

我刚刚发现这是由于我在 此处为 Jedi Vim 描述的一个不理解错误造成的.但是,使用 YouCompleteMe 插件时,只有少数方法显示在:

I just found that it was due to an incomprehension error that I described for Jedi Vim here. However, with YouCompleteMe plug-in only few methods shows up on:

from os import getc

然后我按下 ctrl + space 并显示了可用模块的完整列表.

Then I pressed ctrl + space and a complete list of available modules was displayed.

这篇关于在 Arch Linux 的 TAB 补全中未检测到 Vim YouCompleteMe Python 子类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆