苏林_SLRofa 2021-02-28 10:45 采纳率: 14.3%
浏览 165

GVim安装vim-ariline出错

使用vim-plug安装vim-airline后启动gvim出现如下错误

处理 C:\Embad\Vim\vimfiles\plugin\vim-airline\autoload\airline\e
xtensions\wordcount\formatters\default.vim 时发生错误:

第   14 行:

E121: 未定义的变量: g:airline_statusline_funcrefs

E116: Invalid arguments for function index(g:airline_statusline_fu
ncrefs, function('airline#extensions#wordcount#formatters#defa
ult#update_fmt')) == -1

处理 C:\Embad\Vim\vimfiles\plugin\vim-airline\autoload\airline\e
xtensions\wordcount\formatters\readingtime.vim 时发生错误:

第   14 行:

E121: 未定义的变量: g:airline_statusline_funcrefs

E116: Invalid arguments for function index(g:airline_statusline_fu
ncrefs, function('airline#extensions#wordcount#formatters#readi
ngtime#update_fmt')) == -1

处理 C:\Embad\Vim\vimfiles\plugin\vim-airline\t\airline.vim 
时发生错误:

第    3 行:

E484: 无法打开文件 plugin/airline.vim

第   23 行:

E492: 不是编辑器的命令: describe 'airline'

第   24 行:

E492: 不是编辑器的命令:   before

第   26 行:

E580: :endif 缺少对应的 :if:   end

第   28 行:

E492: 不是编辑器的命令:   it 'should run user funcrefs first'

第   32 行:

E492: 不是编辑器的命令:     Expect airline#statusline(1) =~ 'hello 
world'

第   33 行:

E580: :endif 缺少对应的 :if:   end

第   35 行:

E492: 不是编辑器的命令:   it 'should not change the statusline 
with -1'

第   39 行:

E492: 不是编辑器的命令:     Expect &statusline == 'foo'

第   40 行:

E580: :endif 缺少对应的 :if:   end

第   42 行:

E492: 不是编辑器的命令:   it 'should support multiple chained 
funcrefs'

第   46 行:

E492: 不是编辑器的命令:     Expect airline#statusline(1) =~ 
'helloworld'

第   47 行:

E580: :endif 缺少对应的 :if:   end

第   49 行:

E492: 不是编辑器的命令:   it 'should allow users to redefine 
sections'

第   52 行:

E492: 不是编辑器的命令:     Expect airline#statusline(1) =~ 
'%{airline#util#wrap(airline#parts#mode(),0)}%#airline_a#%#airlin
e_a_bold#%{airline#util#wrap(airline#parts#mode(),0)}%#airline_a
#'

第   53 行:

E580: :endif 缺少对应的 :if:   end

第   55 行:

E492: 不是编辑器的命令:   it 'should remove funcrefs properly'

airline: The airline statusline funcref "function('MyIgnoreFuncref')
" has already been added.

第   59 行:

E492: 不是编辑器的命令:     Expect len(g:airline_statusline_funcref
s) == c

第   60 行:

E580: :endif 缺少对应的 :if:   end

第   62 行:

E492: 不是编辑器的命令:   it 'should overwrite the statusline with 
active and inactive splits'

第   64 行:

E492: 不是编辑器的命令:     Expect airline#statusline(1) !~ 
'inactive'

第   65 行:

E492: 不是编辑器的命令:     Expect airline#statusline(2) =~ 
'inactive'

第   67 行:

E580: :endif 缺少对应的 :if:   end

第   69 行:

E492: 不是编辑器的命令:   it 'should collapse the inactive split if 
the variable is set true'

第   72 行:

E492: 不是编辑器的命令:     Expect getwinvar(2, '&statusline') !~ 
'airline#parts#mode'

第   74 行:

E580: :endif 缺少对应的 :if:   end

第   76 行:

E492: 不是编辑器的命令:   it 'should not collapse the inactive split 
if the variable is set false'

第   79 行:

E492: 不是编辑器的命令:     Expect getwinvar(2, '&statusline') != 
'airline#parts#mode'

第   81 行:

E580: :endif 缺少对应的 :if:   end

第   83 行:

E492: 不是编辑器的命令:   it 'should include check_mode'

第   84 行:

E492: 不是编辑器的命令:     Expect airline#statusline(1) =~ 
'airline#check_mode'

第   85 行:

E580: :endif 缺少对应的 :if:   end

第   86 行:

E580: :endif 缺少对应的 :if: end

处理 C:\Embad\Vim\vimfiles\plugin\vim-airline\t\builder.vim 
时发生错误:

第    4 行:

E492: 不是编辑器的命令: describe 'active builder'

第    5 行:

E492: 不是编辑器的命令:   before

第    7 行:

E580: :endif 缺少对应的 :if:   end

第    9 行:

E492: 不是编辑器的命令:   it 'should start with an empty 
statusline'

第   11 行:

E492: 不是编辑器的命令:     Expect stl == ''

第   12 行:

E580: :endif 缺少对应的 :if:   end

第   14 行:

E492: 不是编辑器的命令:   it 'should transition colors from one to 
the next'

第   18 行:

E492: 不是编辑器的命令:     Expect stl =~ '%#Normal#hello%#No
rmal_to_Search#%#Search#world'

第   19 行:

E580: :endif 缺少对应的 :if:   end

第   21 行:

E492: 不是编辑器的命令:   it 'should reuse highlight group if 
background colors match'

第   28 行:

E492: 不是编辑器的命令:     Expect stl =~ '%#Foo1#helloworld'

第   29 行:

E580: :endif 缺少对应的 :if:   end

第   31 行:

E492: 不是编辑器的命令:   it 'should switch highlight groups if 
foreground colors differ'

第   38 行:

E492: 不是编辑器的命令:     Expect stl =~ '%#Foo1#hello%#Foo1
_to_Foo2#%#Foo2#world'

第   39 行:

E580: :endif 缺少对应的 :if:   end

第   41 行:

E492: 不是编辑器的命令:   it 'should split left/right sections'

第   44 行:

E492: 不是编辑器的命令:     Expect stl =~ '%='

第   45 行:

E580: :endif 缺少对应的 :if:   end

第   47 行:

E492: 不是编辑器的命令:   it 'after split, sections use the right 
separator'

第   52 行:

E492: 不是编辑器的命令:     Expect stl =~ 'hello%#Normal_to_Sea
rch#%#Search#world'

第   53 行:

E580: :endif 缺少对应的 :if:   end

第   55 行:

E492: 不是编辑器的命令:   it 'should not repeat the same highlight

再次重装Vim/plug/airline都未解决该问题

  • 写回答

3条回答 默认 最新

  • 一点青心 2021-05-18 21:31
    关注

    [已解决]

    [原因]因为plug-vim的安装目录,我用的是:plug#begin('$VIM/vimfiles/plugin/'),导致报错.后将目录重新修改,改为'$VIM/plug-vim/'即可.

    [分析]plug-vim是我自定义的目录,$VIM是gvim的安装目录;

    而vimfiles是gvim为用户特设的目录,其主要是对标的主程序目录下的目录文件,方便用户自定义插件位置.但如果通过plug-vim这类管理器安装的插件,可能与vimfile的设计初衷相悖.故,管理器安装的插件还是单独放在自定义的目录中就好.我将vimfiles删掉了,也不影响

    评论

报告相同问题?

悬赏问题

  • ¥15 Unity 2022.3.34版本安卓打包apk失败,gradle配置问题,用的是mono2x
  • ¥15 R语言中安装bibliometrix 后运行biblioshiny出现问题
  • ¥20 关于#android#的问题:用开发助手发现找不到控件(autojs)
  • ¥15 dir815漏洞反弹shell失败
  • ¥15 支付宝小程序云函数登录获取user_id失败
  • ¥50 python for 循环速度慢
  • ¥15 CubeMX生成的代码用keil编译有报错
  • ¥15 Stata链式中介效应代码修改
  • ¥15 pip安装PyAV报错
  • ¥15 latex投稿显示click download