简体   繁体   English

从.vimrc加载vim插件时检测到的错误

[英]Errors detected when loading a vim plugin from .vimrc

I have installed vim 7.3 on debian system along with some vimrc i have downloaded from internet. 我已经在debian系统上安装了vim 7.3以及我从网上下载的一些vimrc。 It used to work fine on my other debian machine but here i get these error messages while i load the vim editor. 它曾经在我的其他debian机器上工作正常,但在这里我得到这些错误消息,而我加载vim编辑器。

Here are the errors: 以下是错误:

Error detected while processing /home/tejinder/.vim/plugin/gundo.vim:
line  196:
E319: Sorry, the command is not available in this version: python << ENDPYTHON
line  197:
E492: Not an editor command: def asciiedges(seen, rev, parents):
line  199:
E121: Undefined variable: rev
E15: Invalid expression: rev not in seen:
line  221:
E133: :return not inside a function
line  231:
E133: :return not inside a function
line  233:
E133: :return not inside a function
line  235:
E133: :return not inside a function
line  238:
E690: Missing "in" after :for
line  347:
E690: Missing "in" after :for
line  356:
E690: Missing "in" after :for
line  453:
E690: Missing "in" after :for
line  464:
E690: Missing "in" after :for
line  469:
E133: :return not inside a function
line  795:
E170: Missing :endfor
Press ENTER or type command to continue

If anyone could figure out thats going on, please guide me. 如果有人能够弄明白这一点,请指导我。 Thanks a lot. 非常感谢。

Here is vimrc source: https://github.com/mitsuhiko/dotfiles/tree/master/vim 这是vimrc源码: https//github.com/mitsuhiko/dotfiles/tree/master/vim

On debian install vim-gnome or vim-nox if you dont have X-server on system. 在debian上安装vim-gnomevim-nox如果你没有系统上的X-server。

$ sudo apt-get install vim-nox

These versions include python support for vim. 这些版本包括对vim的python支持。

The first error message is the one to look at: "python" isn't available in your vim. 第一个错误消息是要查看的消息:“python”在您的vim中不可用。 You may have "vim-tiny" installed. 您可能安装了“vim-tiny”。 Try "apt-get install vim" to get a larger build. 尝试“apt-get install vim”来获得更大的构建。 Also, in vim, you can use the ":version" command to see all the options, and whether each is compiled in or not. 此外,在vim中,您可以使用“:version”命令查看所有选项,以及是否编译每个选项。 Your current vim will have "-python" (meaning no python, as opposed to "+python") in the list displayed. 您当前的vim将在显示的列表中显示“-python”(表示没有python,而不是“+ python”)。

你的VIM没有编译的python支持。不幸的是我不知道如何处理该发行版,因为我是一个关于通过手动安装与包系统冲突的东西搞乱Linux系统的真正大师。

Is your Python version 2.4 or better? 你的Python版本是2.4还是更好?

Test this by running 通过运行测试

python --version

at the command line. 在命令行。

vim 7.3 is the very latest version of vim. vim 7.3是vim的最新版本。 I think, you are using with your old .vimrc files. 我想,您正在使用旧的.vimrc文件。 One good method to troubleshoot would be, move your ~/.vim to ~/.vim_backup and load the vim 7.3 so that uses the system default vimrc. 排除故障的一个好方法是将~/.vim移动到~/.vim_backup并加载vim 7.3以便使用系统默认的vimrc。 See if you still get those errors. 看看你是否还有这些错误。 and load only the plugins which you want with 7.3 in your new .vimrc 并在新的.vimrc仅加载7.3所需的插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM