Something goes wrong when adding jedi-vim

2.1k views Asked by At

I followed mbrochh's instruction https://github.com/mbrochh/vim-as-a-python-ide to build my vim as a python IDE. But things go wrong when openning the vim after I put jedi-vim into ~/.vim/bundle. The following is the warnings

Error detected while processing CursorMovedI Auto commands for "buffer=1":
Traceback (most recent call last)

Error detected while processing CursorMovedI Auto commands for "buffer=1":
  File "string", line 1, in module

Error detected while processing CursorMovedI Auto commands for "buffer=1":
NameError: name 'jedi_vim' is not defined

I hope someone can figure out the problem and thanks for your help.

4

There are 4 answers

3
Ben Klein On

If you’re trying to use Vundle to install the jedi-vim plugin, I don’t think you should have to place it under ~/.vim/bundle. Instead, make sure you have Vundle set up correctly, as described in its “Quick start”, and then try adding this line to your ~/.vimrc after the lines where Vundle is set up:

Plugin 'davidhalter/jedi-vim'

Then run :PluginInstall and the plugin should be installed.

0
I159 On

Dependencies exists in the Jedi git repo. I expect you are using pathogen as extension manager. Use git clone with --recursive option.

cd ~/.vim/bundle/ && git clone --recursive https://github.com/davidhalter/jedi-vim.git

Dave Halter has this instruction in the docs on github.


BTW, this is common behavior for all vim extensions with dependencies, such as flake8-vim. Furthermore if you just cloned any repo, which has dependencies, not recursively, you can have very unexpected issues. So this question in a greater extent about git recursive cloning and git submodules.

0
korkmaz On

make sure that you have install jedi, I solved my problem with below command..

cd ~/.vim/bundle/jedi-vim  
git submodule update --init
0
John Byrne On

(Using ubuntu 14.04LTS with Python 2.7)

I had a very similar issue and I found that I needed to integrate Jedi into my Python installation.

I did the following...

sudo apt-get install python-pip

sudo pip install jedi

Then if you haven't done so already, you can then add Jedi to VIM via Pathogen as follows...

mkdir -p ~/.vim/autoload ~/.vim/bundle

curl -so ~/.vim/autoload/pathogen.vim https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim

Then... add this line to your '~/.vimrc' file (Create it if it doesn't already exist.)

call pathogen#infect()

Then Save and Quit.

Lastly...

cd ~/.vim/bundle

git clone git://github.com/davidhalter/jedi-vim.git

That's it.