pythonvimomnicomplete

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


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.


Solution

  • 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