Vim 8.1.0037 更新破坏了多个插件

Vim 8.1.0037 update breaks multiple plugins

我已将 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

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

中的评论

如果您遇到这样的错误:

Error detected while processing /home/myname/.vim/pack/myname

/start/ctrlp.vim/plugin/ctrlp.vim:

只需尝试使用下面的方法修复:

cd && cd /home/myname/.vim/pack/myname/start/ctrlp.vim/plugin/

git pull --rebase

此外,要解决以下问题:

Error detected while processing /home/myname/.vim/pack/myname

/start/tagbar/plugin/tagbar.vim: 

只需使用:

cd /home/myname/.vim/pack/myname/start/tagbar/plugin/

git pull --rebase

并且,修正以下的喜好:

Error detected while processing /home/myname/.vim/pack/myname

/start/vim-fugitive/plugin/fugitive.vim:

只需使用:

cd /home/myname/.vim/pack/myname/start/vim-fugitive/plugin/ && git pull --rebase

结束!