Vim 启动错误(无效表达式)Debian [英] Vim startup errors (invalid expression) Debian

查看:36
本文介绍了Vim 启动错误(无效表达式)Debian的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设置 Vim 时遇到问题.首先,我在启动 Vim 时遇到了一堆错误,我得到了这些错误:

处理/home/lee/.vimrc 时检测到错误:第 5 行:E492:不是编辑器命令:为运行时路径"中的所有内容生成帮助标签处理/home/lee/.vim/plugin/fuf.vim 时检测到错误:第 13 行:***** 必须安装 L9 库!*****处理/home/lee/.vim/plugin/refactor.vim 时检测到错误:第 45 行:E492:不是编辑器命令:^M第 53 行:E492:不是编辑器命令:^M第 55 行:E15:无效的表达式:[auto"、const"、double"、float"、int"、short"、struct"、unsigned"、break"、continue"、else"、for"、long"、signed"、switch"、void"、case"、default"、enum"、goto"、register"、sizeof"、typedef"、volatile""、"char"、"do"、"extern"、"if"、"return"、"static"、"union"、"while"、"asm"、"dynamic_cast"、"namespace"、"reinterpret_cast"、try"、bool"、explicit"、new"、static_cast"、typeid"、catch"、false"、operator"、template"、typename"、class"、friend"", "private", "this", "using", "const_cast", "inline", "public", "throw", "virtual", "delete", "mutable", "protected", "true","wchar_t", "size_t"]^M第 56 行:E492:不是编辑器命令:^M第 58 行:E15:无效的表达式:'<hw*>'^M第 59 行:E15:无效的表达式:'s*[*&]*s*'^M第 60 行:E121:未定义变量:s:IdentifierPatternE15:无效的表达式: s:IdentifierPattern .s:TypePostfixPattern^M第 62 行:E121:未定义变量:s:TypeElementPatternE15:无效的表达式:'\%(' . s:TypeElementPattern . '\%(' . s:TemplateParameterPattern . s:TypePostfixPattern . ')*' . s:TypePostfixPattern . ')+'^M第 64 行:E15:无效的表达式:'\%(s+
*s*|
+|s*
*s+)'^M第 65 行:E121:未定义变量:s:TypeIdentifierPatternE15:无效的表达式:s:TypeIdentifierPattern.s:MissableSeparatorPattern .s:标识符模式.'\%([d*])*'^M第 66 行:E121:未定义变量:s:TypeIdentifierPatternE15:无效的表达式:'^s*\%(' . s:TypeIdentifierPattern . s:SeperatorPattern. '|' . s:IdentifierPattern . '::)+' ^M第 67 行:E121:未定义变量:s:VariableDeclarationPatternE15:无效表达式:'(' . s:MissableSeperatorPattern . '\%(' . s:VariableDeclarationPattern . '\%(s*,' . s:MissableSeperatorPattern . s:VariableDeclarationPattern . ')*)*s*)'^M第 68 行:E121:未定义变量:s:FunctionPerfixPatternE15:无效的表达式: s:FunctionPerfixPattern .s:MissableSeparatorPattern .s:标识符模式.s:MissableSeparatorPattern .s:参数列表模式.'[^(){;]*'^M第 69 行:E121:未定义变量:s:FunctionPatternE15:无效的表达式: s:FunctionPattern .s:MissableSeparatorPattern .'\%(;)@='^M第 70 行:E121:未定义变量:s:FunctionPatternE15:无效的表达式: s:FunctionPattern .s:MissableSeparatorPattern .'\%({)@='^M第 71 行:E492:不是编辑器命令:^M第 72 行:E488:尾随字符第 114 行:E492:不是编辑器命令:^M第 115 行:E488:尾随字符第 182 行:E492:不是编辑器命令:^M第 183 行:E488:尾随字符第 220 行:E492:不是编辑器命令:^M第 221 行:E488:尾随字符第 240 行:E492:不是编辑器命令:^M第 241 行:E488:尾随字符第 285 行:E492:不是编辑器命令:^M第 286 行:E488:尾随字符第 359 行:E492:不是编辑器命令:^M第 360 行:E488:尾随字符第 372 行:E492:不是编辑器命令:^M第 374 行:E488:尾随字符第 411 行:E492:不是编辑器命令:^M第 412 行:E488:尾随字符第 424 行:E492:不是编辑器命令:^M第 425 行:E488:尾随字符第 432 行:E492:不是编辑器命令:^M第 433 行:E488:尾随字符按 ENTER 或键入命令继续

另外,当我尝试运行 :helptags ~/.vim/doc 时,它根本不会加载.它只是显示一个空白的编辑器屏幕.

非常感谢您的帮助,我已经在网上搜索了解决方案,但我无法修复它.我真的很想开始使用 Vim.谢谢!

我添加了我的 .vimrc

设置不兼容调用病原体#infect()执行病原体#infect()调用病原体#helptags()为runtimepath"中的所有内容生成帮助标签语法文件类型插件缩进

解决方案

天哪!我看到了几个问题:

E492:不是编辑器命令:为运行时路径"中的所有内容生成帮助标签

你必须有一行以 generate helptags ... 开头的地方(你的 ~/.vimrc?);它应该是注释:在行前添加 ".

<小时>

***** L9 库必须安装!*****

FuzzyFinder 插件需要另一个插件;你可以在 L9 - Vim-script library 获得它.

<小时>

处理/home/lee/.vim/plugin/refactor.vim 时检测到错误:第 45 行:E492:不是编辑器命令:^M

这是由在 Linux 上使用时具有 Windows 样式 CR-LF 行结尾的 Vimscript 文件引起的.在 Vim 中打开相应的文件并通过

将它们转换为 Unix 风格的结尾

:w ++ff=unix

<小时>

我希望你会在这些之后开始看到光明.指向完整 Vim 配置的链接将有助于进一步诊断.如果您是 Vim 新手,建议您从精简的 .vimrc 开始,然后逐渐添加插件,随着您变得更加熟练并确定需求.p>

I'm having issues setting up Vim. Firstly I'm having a bunch of errors when start up Vim, I get these errors:

Error detected while processing /home/lee/.vimrc:
line    5:
E492: Not an editor command: generate helptags for everything in 'runtimepath'
Error detected while processing /home/lee/.vim/plugin/fuf.vim:
line   13:
***** L9 library must be installed! *****
Error detected while processing /home/lee/.vim/plugin/refactor.vim:
line   45:
E492: Not an editor command: ^M
line   53:
E492: Not an editor command: ^M
line   55:
E15: Invalid expression: ["auto", "const", "double", "float", "int", "short", "struct", "unsigned", "break", "continue", "else", "for", "long", "signed", "switch", "void", "case", "default", "enum", "goto", "register", "sizeof", "typedef", "volatile", "char", "do", "extern", "if", "return", "static", "union", "while", "asm", "dynamic_cast", "namespace", "reinterpret_cast", "try", "bool", "explicit", "new", "static_cast", "typeid", "catch", "false", "operator", "template", "typename", "class", "friend", "private", "this", "using", "const_cast", "inline", "public", "throw", "virtual", "delete", "mutable", "protected", "true", "wchar_t", "size_t"]^M
line   56:
E492: Not an editor command: ^M
line   58:
E15: Invalid expression: '<hw*>'^M
line   59:
E15: Invalid expression: 's*[*&]*s*'^M
line   60:
E121: Undefined variable: s:IdentifierPattern
E15: Invalid expression: s:IdentifierPattern . s:TypePostfixPattern^M
line   62:
E121: Undefined variable: s:TypeElementPattern
E15: Invalid expression: '\%(' . s:TypeElementPattern . '\%(' . s:TemplateParameterPattern . s:TypePostfixPattern . ')*' . s:TypePostfixPattern . ')+'^M
line   64:
E15: Invalid expression: '\%(s+
*s*|
+|s*
*s+)'^M
line   65:
E121: Undefined variable: s:TypeIdentifierPattern
E15: Invalid expression: s:TypeIdentifierPattern . s:MissableSeperatorPattern . s:IdentifierPattern . '\%([d*])*'^M
line   66:
E121: Undefined variable: s:TypeIdentifierPattern
E15: Invalid expression: '^s*\%(' . s:TypeIdentifierPattern . s:SeperatorPattern. '|' . s:IdentifierPattern . '::)+' ^M
line   67:
E121: Undefined variable: s:VariableDeclarationPattern
E15: Invalid expression: '(' .  s:MissableSeperatorPattern . '\%(' . s:VariableDeclarationPattern . '\%(s*,' . s:MissableSeperatorPattern . s:VariableDeclarationPattern . ')*)*s*)'^M
line   68:
E121: Undefined variable: s:FunctionPerfixPattern
E15: Invalid expression: s:FunctionPerfixPattern . s:MissableSeperatorPattern . s:IdentifierPattern . s:MissableSeperatorPattern . s:ParameterListPattern . '[^(){;]*'^M
line   69:
E121: Undefined variable: s:FunctionPattern
E15: Invalid expression: s:FunctionPattern . s:MissableSeperatorPattern . '\%(;)@='^M
line   70:
E121: Undefined variable: s:FunctionPattern
E15: Invalid expression: s:FunctionPattern . s:MissableSeperatorPattern . '\%({)@='^M
line   71:
E492: Not an editor command: ^M
line   72:
E488: Trailing characters
line  114:
E492: Not an editor command: ^M
line  115:
E488: Trailing characters
line  182:
E492: Not an editor command: ^M
line  183:
E488: Trailing characters
line  220:
E492: Not an editor command: ^M
line  221:
E488: Trailing characters
line  240:
E492: Not an editor command: ^M
line  241:
E488: Trailing characters
line  285:
E492: Not an editor command: ^M
line  286:
E488: Trailing characters
line  359:
E492: Not an editor command: ^M
line  360:
E488: Trailing characters
line  372:
E492: Not an editor command: ^M
line  374:
E488: Trailing characters
line  411:
E492: Not an editor command: ^M
line  412:
E488: Trailing characters
line  424:
E492: Not an editor command: ^M
line  425:
E488: Trailing characters
line  432:
E492: Not an editor command: ^M
line  433:
E488: Trailing characters
Press ENTER or type command to continue

Also, when I try to run :helptags ~/.vim/doc it doesn't load at all. It just shows a blank editor screen.

I would appreciate your help, I've searched the web for solutions but I've been unable to fix it. I really want to start using Vim. Thank you!

EDIT: I added my .vimrc

set nocompatible
call pathogen#infect()
execute pathogen#infect()
call pathogen#helptags()
generate helptags for everything in 'runtimepath'
syntax on
filetype plugin indent on

解决方案

Oh my gosh! I see several issues:

E492: Not an editor command: generate helptags for everything in 'runtimepath'

You must have a line starting with generate helptags ... somewhere (your ~/.vimrc?); it should be a comment: Prepend a " to the line.


***** L9 library must be installed! *****

The FuzzyFinder plugin requires another plugin; you can get it at L9 - Vim-script library.


Error detected while processing /home/lee/.vim/plugin/refactor.vim:
line   45:
E492: Not an editor command: ^M

That's caused by Vimscript files that have Windows-style CR-LF line endings when used on Linux. Open the corresponding file(s) in Vim and convert them to Unix-style endings via

:w ++ff=unix


I hope you'll start to see the light after these. A link to your full Vim config would be helpful to further diagnose this. If you're new to Vim, it's recommended to start with a lean .vimrc, and only gradually add plugins, as you become more proficient and identify the needs.

这篇关于Vim 启动错误(无效表达式)Debian的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆