I was able to fix it myself by providing jedi-vim with the location of the packages in my anaconda folder using the $PYTHONPATH variable as follows:
Thanks to all!
Or Add following line in ~/.bash_profile
You can't. The :python and :python3 commands always use the compiled-in interpreters. If you have a recent version of Vim with python and / or python3 loaded dynamically (see :h python-dynamic) you can use pythondll and pythonthreedll to load different interpreters, but replacing CPython by Anaconda is IMO asking for segfaults (provided that Vim accepts it ...
2018+ Jedi Versions
You can just use :let jedi#force_py_version=3.8 if you want to switch to the latest Python version, for example. Unfortunately there is no environment listing in jedi-vim, yet. We need to build that (it is available in Jedi, though).
Basically the only thing you can do currently is to compile VIM with Python 3.5 support. ...
The jedi-vim plug-in doesn't just use the python3 binary, but also the Vim python integration through Python libraries. That's why just updating your $PATH to point at Anaconda Python is not enough to have jedi-vim use it.
Unfortunately, there's not really a great way to have your system Vim use the Python libraries from Anaconda, you usually need to build (...
Your problem has nothing to do with jedi-vim. It has to do with vim-latex using the conceal feature of gVim, where some parts of text are replaced by (supposedly better) graphic representations when you aren't editing the corresponding lines. In your case a superscript is replaced, but IIRC vim-latex does that with many other things, such as Greek letters ...
I don't use your plugins so I can't be entirely sure it will fix your issue, but it seems you want mappings in insert mode which behave differently depending on whether the popup menu is visible or not.
You can use the pumvisible() function to test if the popup menu is visible, it returns 0 when it's not, 1 otherwise.
Then you can build an expression with ...
As a simple solution, try adding this line to your vimrc:
let g:SuperTabDefaultCompletionType = "context"
This will result in the following behavior, which should be what you need in most cases:
/usr/l<tab> # will use filename completion
myvar.t<tab> # will use user completion if completefunc set, or
# omni completion if omnifunc ...
It turns out I had a compiled version of python in /usr/local that I had completely forgotten about, and vim was compiled against that one. I verified this by using :py print(sys.path), which showed directories under /usr/local. I removed the compiled version of python and recompiled vim against the standard version, and all is well.
I have had moderate success with pydoc.vim for documentation; it can be helpful to use a virtualenv/run setup.py develop, but you may still have to point it at the right python.
I’ve also had moderate success with tags (I use universal ctags and these hooks to keep them up to date). With tags, I can quickly jump to the source and read a docstring. ...
If you look at the plugin's code you'll find that the mapping is done like this:
execute 'nnoremap <buffer> '.g:jedi#goto_command.' :call jedi#goto()<CR>'
So what you can do is override that with your own ftplugin (:h ftplugin) and your own mapping. You could create ~/.vim/after/ftplugin/python.vim this is a file which will be executed when a ...
You could compile vim with anaconda:
I did ./configure --with-features=huge --enable-pythoninterp --with-python-config-dir=~/anaconda/lib/python2.7/config/, I remember that I did similar tests afterwards and :py import sys; print sys.path was giving me correct results.
Based on the web search you could perhaps do something like this (ex. for 3.4):
The following approach was not tested with Anaconda, but it fixed the issues for me when working with virtualenvwrapper
The vim-virtualenv plugin changes the executable and modifies sys.path and the $PATH environment.
I've compiled vim with python3.5, so when no virtualenv is activated I get:
:py3 import sys; print(sys.executable)
I'm using 32bit vim for compatibility with other extensions, but the 64 bit python is first on my PATH for other reasons. Hence I installed the 32 bit python using conda via:
conda create -n py27_32bit python=2.7
pip install jedi
and added this to my .vimrc:
if has('win32')&& isdirectory('C:/...
David has a valid point about intermingling Vim with different flavors of Python and if hard coding PYTHONPATH to Anaconda Python in .profile/.bashrc really does lead to SEG 11 could one use a shell alias.
alias vim3='PYTHONPATH=/usr/lib/Anaonda/.../site-packages vim'
Perhaps this work-around will suffice.