【问题标题】:Vim 8.1.0037 update breaks multiple pluginsVim 8.1.0037 更新中断了多个插件
【发布时间】:2018-06-14 22:23:27
【问题描述】:

我已将我的 vim 更新到 8.1.0037(vim --version 显示为 6 月 13 日编译),当我今天打开它时,多个插件坏了。

在重新启动并重新安装所有这些插件时,它们仍然损坏。

有什么方向吗?在我看来,更新破坏了插件。

我的.vimrc 看起来像:

filetype plugin indent on
syntax on 
set number
set encoding=utf-8

autocmd vimenter * NERDTree /home/myname
map <F4> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

错误消息如下所示。

Error detected while processing /home/myname/.vim/pack/myname/start/ctrlp.vim/plugin/ctrlp.vim:
line   13:
E475: Invalid argument: 
line   14:
E10: \ should be followed by /, ? or &
line   15:
E10: \ should be followed by /, ? or &
Error detected while processing function ctrlp#mrufiles#opts:
line    1:
E15: Invalid expression: 
E15: Invalid expression: ['g:ctrlp_mruf_', {
line    2:
E10: \ should be followed by /, ? or &
line    3:
E10: \ should be followed by /, ? or &
line    4:
E10: \ should be followed by /, ? or &
line    5:
E10: \ should be followed by /, ? or &
line    6:
line   10:
E121: Undefined variable: opts
E116: Invalid arguments for function items(opts)
E15: Invalid expression: items(opts)
Error detected while processing /home/myname/.vim/pack/myname/start/ctrlp.vim/plugin/ctrlp.vim:
line   50:
E10: \ should be followed by /, ? or &
line   53:
E10: \ should be followed by /, ? or &
Error detected while processing /home/myname/.vim/pack/myname/start/tagbar/plugin/tagbar.vim:
line   39:
E10: \ should be followed by /, ? or &
line   40:
E10: \ should be followed by /, ? or &
Error detected while processing function <SNR>45_setup_options:
line    6:
E697: Missing end of List ']': 
E15: Invalid expression: [
Error detected while processing 

/home/myname/.vim/pack/myname/start/tagbar/plugin/tagbar.vim:
    line   88:
    E15: Invalid expression: 
    E15: Invalid expression: has('multi_byte') && has('unix') && &encoding == 'utf-8' &&
    line   89:
    E10: \ should be followed by /, ? or &
    Error detected while processing function <SNR>45_setup_keymaps:
    line    1:
    E697: Missing end of List ']': 
    E15: Invalid expression: [
    Error detected while processing function airline#init#bootstrap:
    line   24:
    E15: Invalid expression: 
    E116: Invalid arguments for function extend
    line   25:
    E10: \ should be followed by /, ? or &
    line   26:
E10: \ should be followed by /, ? or &
        line   33:
        E10: \ should be followed by /, ? or &
        line   34:
        E10: \ should be followed by /, ? or &
        line   35:
        E10: \ should be followed by /, ? or &
        line   36:
        E10: \ should be followed by /, ? or &
        line   37:
        E10: \ should be followed by /, ? or &
        line   40:
        E15: Invalid expression: 
        E116: Invalid arguments for function extend
        line   41:
        E10: \ should be followed by /, ? or &
        line   42:
        E10: \ should be followed by /, ? or &
        line   43:
        E10: \ should be followed by /, ? or &
        line   44:
        E10: \ should be followed by /, ? or &
        line   45:
        E10: \ should be followed by /, ? or &
        line   46:
        E10: \ should be followed by /, ? or &
        line   47:
        E10: \ should be followed by /, ? or &
        line   48:
        E10: \ should be followed by /, ? or &
        line   49:
        E10: \ should be followed by /, ? or &
        line   55:
        E15: Invalid expression: 
        E116: Invalid arguments for function extend
        line   56:
        E10: \ should be followed by /, ? or &
        line   57:
        E10: \ should be followed by /, ? or &
        line   58:
        E10: \ should be followed by /, ? or &
        line   59:
        E10: \ should be followed by /, ? or &
        line   60:
        E10: \ should be followed by /, ? or &
        line   61:
        E10: \ should be followed by /, ? or &
        line   62:
        E10: \ should be followed by /, ? or &
        line   72:
        E10: \ should be followed by /, ? or &
        line   73:
        E10: \ should be followed by /, ? or &
        line   74:
        E10: \ should be followed by /, ? or &
        line   75:
        E10: \ should be followed by /, ? or &
        line   76:
        E10: \ should be followed by /, ? or &
        line   77:
        E10: \ should be followed by /, ? or &
        line   78:
        E10: \ should be followed by /, ? or &
        line   79:
        E10: \ should be followed by /, ? or &
        line   87:
        E15: Invalid expression: 
        E116: Invalid arguments for function extend
        line   88:
        E10: \ should be followed by /, ? or &
        line   89:
        E10: \ should be followed by /, ? or &
        line   90:
        E10: \ should be followed by /, ? or &
        line   91:
        E10: \ should be followed by /, ? or &
        line   92:
        E10: \ should be followed by /, ? or &
        line   93:
        E10: \ should be followed by /, ? or &
        line   94:
        E10: \ should be followed by /, ? or &
        line   95:
        E10: \ should be followed by /, ? or &
        line  103:
        E10: \ should be followed by /, ? or &
        line  104:
        E10: \ should be followed by /, ? or &
        line  105:
        E10: \ should be followed by /, ? or &
        line  106:
        E10: \ should be followed by /, ? or &
        line  107:
        E10: \ should be followed by /, ? or &
        line  108:
        E10: \ should be followed by /, ? or &
        line  109:
        E10: \ should be followed by /, ? or &
        line  110:
        E10: \ should be followed by /, ? or &
        line  113:
        E15: Invalid expression: 
        E116: Invalid arguments for function airline#parts#define
        line  114:
        E10: \ should be followed by /, ? or &
        line  115:
        E10: \ should be followed by /, ? or &
        line  116:
        E10: \ should be followed by /, ? or &
        line  122:
        E15: Invalid expression: 
        E116: Invalid arguments for function airline#parts#define
        line  123:
        E10: \ should be followed by /, ? or &
        line  124:
        E10: \ should be followed by /, ? or &
        line  125:
        E10: \ should be followed by /, ? or &
        line  128:
        E15: Invalid expression: 
        E116: Invalid arguments for function airline#parts#define
        line  129:
        E10: \ should be followed by /, ? or &
        line  130:
        E10: \ should be followed by /, ? or &
        line  131:
        E15: Invalid expression: 
        E116: Invalid arguments for function airline#parts#define
        line  132:
        E10: \ should be followed by /, ? or &
        line  133:
        E10: \ should be followed by /, ? or &
        line  135:
        E697: Missing end of List ']': 
        E116: Invalid arguments for function airline#parts#define_empty
        line  136:
        E10: \ should be followed by /, ? or &
        line  137:
        E10: \ should be followed by /, ? or &
        line  138:
        E10: \ should be followed by /, ? or &
        --- Auto-Commands ---
        Error detected while processing function <SNR>46_airline_toggle:
        line   19:
        E10: \ should be followed by /, ? or &
        line   20:
        E10: \ should be followed by /, ? or &
        --- Auto-Commands ---
        line   33:
        E10: \ should be followed by /, ? or &
        --- Auto-Commands ---
        VimEnter
        *NERDTree /home/qiuxiao/
        FileExplorer  VimEnter
        *sil call s:VimEnter(expand("<amatch>"))
        youcompletemeStart  VimEnter
        *call youcompleteme#Enable()
        NERDTreeHijackNetrw  VimEnter
        *silent! autocmd! FileExplorer
        call nerdtree#checkForBrowse(expand("<amatch>"))
        matchparen  WinEnter
        *call s:Highlight_Matching_Pair()
        CtrlPMRUF  BufWinEnter
        *cal s:record(expand('<abuf>', 1))
        filetypeplugin  FileType
        *call s:LoadFTPlugin()
        filetypeindent  FileType
        *call s:LoadIndent()
        syntaxset  FileType
        *exe "set syntax=" . expand("<amatch>")
        line   35:
        E10: \ should be followed by /, ? or &
        --- Auto-Commands ---
        line   43:
        E10: \ should be followed by /, ? or &
        line   44:
        E10: \ should be followed by /, ? or &
        --- Auto-Commands ---
        Error detected while processing 

    /home/myname/.vim/pack/myname/start/vim-fugitive/plugin/fugitive.vim:
        line  151:
        E10: \ should be followed by /, ? or &
        line  152:
        E10: \ should be followed by /, ? or &
        line  153:
        E10: \ should be followed by /, ? or &
        line  154:
        E10: \ should be followed by /, ? or &
        line  155:
        E10: \ should be followed by /, ? or &
        line  156:
        E10: \ should be followed by /, ? or &
        Press ENTER or type command to continue

【问题讨论】:

  • 我认为是这个更新破坏了我在 Linux Mint 18.3 上的插件 -- vim-gtk3 (2:8.1.0037-0york1~16.04) 到 2:8.1.0037+v8.1.0053- 0~ubuntu16.04.1 -- 来自 jonathonf/vim PPA
  • @MikeLippert 我在 ElementaryOS 上,更新仅包括 vimvim-tinyvim-runtime。在我看来,是 vim 本身破坏了它。
  • 我同意。看看你的 cpoptions,我找到了一个似乎相关的线程 groups.google.com/d/topic/vim_use/94wo-ZiqJwo/discussion,并在其中发布了一条消息。
  • @MikeLippert 感谢迈克。我还在vim的github上提出了一个问题。我们也可以关注那里。
  • 我有一个类似的问题,当我启动 VIM 时,我得到一个错误 Error detected while processing function Pathogen#infect[8]..pathogen#interpose[12]..pathogen#is_disabled: 第 5 行: E15:无效表达式:E15:无效表达式:按 ENTER 或键入命令继续

标签: vim nerdtree ctrlp vim-fugitive vim-airline


【解决方案1】:

tl;dr: 已被版本2:8.1.0061-0york1~16.04修复


看来来自 jonathonf 的 vim PPA 的更新版本 2:8.1.0037+v8.1.0053-0~ubuntu16.04.1 软件包有问题。特别是 vim-tinyvim-common 现在将一些文件放入 /usr/share/vim/vim810037+v81/ 而不是 /usr/share/vim/vim81/

我能够通过以下方式解决问题(权宜之计,并且我不确定包修复后它将如何工作):

sudo cp /usr/share/vim/vim810037+v81/debian.vim /usr/share/vim/vim81/

然后编辑和更改运行时路径

sudo vim /usr/share/vim/vim81/debian.vim
:%s/vim810037+v81/vim81/
:wq

有关原因的更多信息,请参阅 jonathonf 在https://github.com/vim/vim/issues/3014 中的 cmets

【讨论】:

  • 感谢您花在这个 Mike 上的时间,这似乎是一个不错的修复。现在我们知道发生了什么,我认为乔纳森很快就会调查。不要忘记我们也可以从源代码构建最新的 vim(在这里作弊:P),如果有人再次碰到这个。
  • 现在由 PPA 的所有者 Jonathon F. 修复。
猜你喜欢
  • 2011-06-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-08-31
  • 2021-12-15
  • 1970-01-01
相关资源
最近更新 更多