有没有办法让 python omnicomplete 在 vi​​m 中使用非系统模块? [英] Is there any way to get python omnicomplete to work with non-system modules in vim?

查看:13
本文介绍了有没有办法让 python omnicomplete 在 vi​​m 中使用非系统模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我唯一可以使用 python omnicomplete 的东西是系统模块.我在网站包中的模块或我目前正在处理的模块方面没有任何帮助.

The only thing I can get python omnicomplete to work with are system modules. I get nothing for help with modules in my site-packages or modules that I'm currently working on.

推荐答案

我在 PYTHONPATH 或站点包中完成了我自己的模块.我不确定您使用的是哪个版本的 pythoncomplete.vim 脚本,但您可能希望确保它是最新版本.

I get completion for my own modules in my PYTHONPATH or site-packages. I'm not sure what version of the pythoncomplete.vim script you're using, but you may want to make sure it's the latest.

以下是我在系统上看到的一些示例...

Here's some examples of what I'm seeing on my system...

这个文件 (mymodule.py),我放在 PYTHONPATH 的一个目录中,然后放在 site-packages 中.两次我都能得到下面的截图.

This file (mymodule.py), I puth in a directory in PYTHONPATH, and then in site-packages. Both times I was able to get the screenshot below.

myvar = 'test'

def myfunction(foo='test'):
    pass

class MyClass(object):
    pass

这篇关于有没有办法让 python omnicomplete 在 vi​​m 中使用非系统模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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