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

发布于 2024-10-09 22:41:34 字数 1172 浏览 7 评论 0原文

我已经在 debian 系统上安装了 vim 7.3 以及从互联网下载的一些 vimrc。它曾经在我的另一台 debian 机器上运行良好,但在这里我在加载 vim 编辑器时收到这些错误消息。

以下是错误:

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

如果有人能弄清楚发生了什么,请指导我。多谢。

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

I have installed vim 7.3 on debian system along with some vimrc i have downloaded from internet. It used to work fine on my other debian machine but here i get these error messages while i load the vim editor.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

潜移默化 2024-10-16 22:41:34

在 debian 上,如果系统上没有 X-server,请安装 vim-gnomevim-nox

$ sudo apt-get install vim-nox

这些版本包括对 vim 的 python 支持。

On debian install vim-gnome or vim-nox if you dont have X-server on system.

$ sudo apt-get install vim-nox

These versions include python support for vim.

绳情 2024-10-16 22:41:34

第一条错误消息是需要查看的:“python”在您的 vim 中不可用。您可能安装了“vim-tiny”。尝试“apt-get install vim”以获得更大的构建。另外,在 vim 中,您可以使用“:version”命令查看所有选项,以及每个选项是否已编译。您当前的 vim 将在显示的列表中显示“-python”(表示没有 python,而不是“+python”)。

The first error message is the one to look at: "python" isn't available in your vim. You may have "vim-tiny" installed. Try "apt-get install vim" to get a larger build. Also, in vim, you can use the ":version" command to see all the options, and whether each is compiled in or not. Your current vim will have "-python" (meaning no python, as opposed to "+python") in the list displayed.

不一样的天空 2024-10-16 22:41:34

你的 VIM 没有编译 Python 支持。不幸的是,我无法帮助了解如何处理该发行版,因为我是通过手动安装与软件包系统冲突的东西来搞乱 Linux 系统的真正大师。

Your VIM has no python support compiled in. Unfortunately I cannot help about what to do with that distribution because I'm a true master about messing up linux systems by manually installing stuff conflicting with the package system.

甜宝宝 2024-10-16 22:41:34

您的 Python 版本是 2.4 或更高版本吗?

行运行来测试这一点。

python --version

通过在命令

Is your Python version 2.4 or better?

Test this by running

python --version

at the command line.

﹏雨一样淡蓝的深情 2024-10-16 22:41:34

vim 7.3 是 vim 的最新版本。我认为,您正在使用旧的 .vimrc 文件。一种很好的故障排除方法是将 ~/.vim 移动到 ~/.vim_backup 并加载 vim 7.3,以便使用系统默认的 vimrc。看看您是否仍然遇到这些错误。并在新的 .vimrc 中仅加载 7.3 所需的插件

vim 7.3 is the very latest version of vim. I think, you are using with your old .vimrc files. 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. See if you still get those errors. and load only the plugins which you want with 7.3 in your new .vimrc

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文