【问题标题】:Errors when opening VIM (pathogen,rope,python)打开 VIM 时出错(病原体、绳索、python)
【发布时间】:2013-11-15 04:27:10
【问题描述】:

系统升级后:

  • 分销商 ID:Ubuntu
  • 说明:Ubuntu 12.04.2 LTS
  • 发布:12.04
  • 代号:精确

每次打开 vim 时都会出现这些错误,有什么提示吗?如果需要,我可以提供 .vimrc 文件。提前致谢!

"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:
...

【问题讨论】:

    标签: python-2.7 vim jedi pathogen rope


    【解决方案1】:

    原因似乎很明显:您使用的 Vim 版本不支持 python。

    解决方案也很明显:安装一个支持 python 构建的 Vim。

    如果您使用图形环境:

    $ sudo apt-get install vim-gnome
    

    如果你不这样做:

    $ sudo apt-get install vim-nox
    

    【讨论】:

    • 感谢@Romainl,确实“vim-nox”在重启后解决了问题。
    • 不需要重启。
    猜你喜欢
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    • 2015-10-17
    • 1970-01-01
    • 1970-01-01
    • 2017-06-17
    • 2014-03-06
    • 1970-01-01
    相关资源
    最近更新 更多