سؤال

After a system upgrade to:

  • Distributor ID: Ubuntu
  • Description: Ubuntu 12.04.2 LTS
  • Release: 12.04
  • Codename: precise

Each time I open vim I get these errors, any hint? If needed I can provide .vimrc file. Thanks in advance!

"new.py" [New File]

Error detected while processing /home/ajn/.vim/bundle/ropevim/ftplugin/python/ropevim.vim:

line    4:

E319: Sorry, the command is not available in this version: python << EOF

Error detected while processing /home/ajn/.vim/bundle/jedi-vim/autoload/jedi.vim:

line  172:

E319: Sorry, the command is not available in this version: python3 << PYTHONEOF

line  174:

E492: Not an editor command: import vim

line  176:

E488: Trailing characters: # update the system path, to include the jedi path

line  177:

E492: Not an editor command: import sys

line  178:

E492: Not an editor command: import os

line  179:

E492: Not an editor command: sys.path.insert(0, os.path.join(vim.eval('expand("<sfile>:p:h:h")'), 'jedi'))

line  181:

E488: Trailing characters: # to display errors correctly

line  182:

E492: Not an editor command: import traceback

line  184:

E488: Trailing characters: # update the sys path to include the jedi_vim script

line  185:

E492: Not an editor command: sys.path.insert(1, os.path.join(vim.eval('expand("<sfile>:p:h:h")'), 'plugin'))

line  186:
...
هل كانت مفيدة؟

المحلول

The cause seems to be rather obvious: you use a version of Vim that's not built with python support.

The solution is also rather obvious: install a Vim built with python support.

If you use a graphical environment:

$ sudo apt-get install vim-gnome

If you don't:

$ sudo apt-get install vim-nox
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top