linux - Jedi Vim Python subclasses are not detected on TAB-completion -
the issue on arch (1) & debian jessie (2) where:
1.
> uname -r 4.0.5-1-arch > echo $pythonpath /usr/lib/python2.7/
- debian jessie without pythonpath set.
my vim compiled python.
:python import sys; print(sys.version) 2.7.10 (default, may 26 2015, 04:16:29) [gcc 5.1.0]
i tried following arch linux packages:
> pacman -s python2-jedi vim-jedi
completion works on classes not on subclasses.
import os # os built-in library. os. # ycm not complete members of class.
i removed them , downloaded git package.
> cd ~/.vim/bundle/jedi-vim/jedi/test/ && ./run.py summary: (0 fails of 962 tests) in 18.819s > cd ../ && ./setup build && ./setup install
and again, completion works on classes not on subclasses.
my previous question sent me jedi-vim vim youcompleteme python subclasses not detected on tab-completion in arch linux
i realized did error due incomprehension. trying import following way:
which natural when used ipython tab completion this:
that wrong way import module in python script. right way:
finally, jedi-vim plug-in works perfectly. in case of uncertainty related unavailable imports can verify imports with:
:python import sys; print(sys.path)
and add missing directories during run time test if absence causing issue.
:python import sys; sys.path.append("/path/to/dir")
in case os.py located @ /usr/lib/python2.7/.
i hope clarifies future jedi-vim users.
Comments
Post a Comment