Is there any way to get python omnicomplete to work with non-system modules in vim?

后端 未结 6 1330
余生分开走
余生分开走 2020-12-28 22:26

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

6条回答
  •  生来不讨喜
    2020-12-28 22:42

    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.

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

    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
    

提交回复
热议问题