[英]How do I remove duplicates from vim :scriptnames file?
I'm trying to learn vim. 我正在努力学习vim。 When I open the program I'm met with this:
当我打开程序时,我遇到了这个:
The airline statusline funcref function('airline#extensions#mundo#statusline') has already been added.The airline statusline funcref function('airline#extensions#mundo#statusline') has already been added.
The owner said : 店主说 :
that error message suggests that you have airline installed twice...
该错误消息表明您已安装航空公司两次......
did you install airline globally as well as via vundle or something?
你是在全球范围内安装航空公司还是通过vundle或其他东西安装? what does :scriptnames tell you?
是什么:脚本名告诉你? thanks.
谢谢。
Which was the case for the OP and what looks to be for me too. OP的情况如此,对我来说也是如此。 I ran :scriptnames and got the following references to airline:
我跑了:脚本名并得到以下对航空公司的引用:
56: ~/.vim/bundle/vim-airline/plugin/airline.vim
57: ~/.vim/bundle/vim-airline/autoload/airline.vim
58: ~/.vim/bundle/vim-airline/autoload/airline/init.vim
59: ~/.vim/bundle/vim-airline/autoload/airline/parts.vim
60: ~/.vim/bundle/vim-airline-themes/plugin/airline-themes.vim
78: ~/.vim/bundle/vim-airline/autoload/airline/extensions.vim
79: ~/.vim/bundle/vim-airline/autoload/airline/extensions/quickfix.vim
80: ~/.vim/bundle/vim-airline/autoload/airline/extensions/netrw.vim
81: ~/.vim/bundle/vim-airline/autoload/airline/extensions/ctrlp.vim
82: ~/.vim/bundle/vim-airline/autoload/airline/extensions/commandt.vim
83: ~/.vim/bundle/vim-airline/autoload/airline/extensions/branch.vim
84: ~/.vim/bundle/vim-airline/autoload/airline/extensions/syntastic.vim
85: ~/.vim/bundle/vim-airline/autoload/airline/extensions/whitespace.vim
86: ~/.vim/bundle/vim-airline/autoload/airline/extensions/wordcount.vim
87: ~/.vim/bundle/vim-airline/autoload/airline/extensions/tmuxline.vim
88: ~/.vim/bundle/vim-mundo/autoload/airline/extensions/mundo.vim
89: ~/.vim/bundle/vim-airline/autoload/airline/section.vim
90: ~/.vim/bundle/vim-airline/autoload/airline/highlighter.vim
91: ~/.vim/bundle/vim-airline/autoload/airline/themes/dark.vim
92: ~/.vim/bundle/vim-airline/autoload/airline/themes.vim
93: ~/.vim/bundle/vim-airline/autoload/airline/util.vim
99: ~/.vim/bundle/vim-airline/autoload/airline/builder.vim
100: ~/.vim/bundle/vim-airline/autoload/airline/extensions/default.vim
What I don't know (and what I think I need help with) is the location of the file :scriptnames references and how to remove duplicates. 我不知道(以及我认为我需要帮助)是文件的位置:脚本名称引用以及如何删除重复项。
Thanks for your thoughts. 谢谢你的想法。
Most Vim plugins consist of several script files. 大多数Vim插件由几个脚本文件组成。 It is therefore normal to see multiple references in
:scriptnames
. 因此,在
:scriptnames
看到多个引用是正常的。 In your output, the base Airline directory is ~/.vim/bundle/vim-airline
; 在您的输出中,基本Airline目录是
~/.vim/bundle/vim-airline
; all of these base directories have a common substructure under them (usually autoload/...
and plugin/...
). 所有这些基本目录下都有一个共同的子结构(通常是
autoload/...
和plugin/...
)。
What the owner meant was to check for multiple base directories, eg both ~/.vim/bundle/vim-airline
and ~/.vim/bundle/vim-another-airline
. 所有者的意思是检查多个基本目录,例如
~/.vim/bundle/vim-airline
和~/.vim/bundle/vim-another-airline
。 Based on your output, that doesn't seem to be the case. 根据您的输出,似乎并非如此。 Also, the error is about the Mundo extension for Airline, not Airline itself.
此外,错误是关于航空公司的Mundo扩展,而不是航空公司本身。 Shouldn't you then look for multiple installations of Mundo?!
那么你不应该寻找Mundo的多个装置吗?!
If you have two same plugins installed, you need to uninstall vim-airline
. 如果您安装了两个相同的插件,则需要卸载
vim-airline
。 You will be having two lines of Plugin vim-airlines
or something similar in vimrc
. 您将在
vimrc
拥有两行Plugin vim-airlines
或类似的东西。 The exact names for plugins might be different. 插件的确切名称可能不同。 Delete any duplicate lines and run
删除任何重复的行并运行
:PluginUpdate
:PluginClean
Hope this helps 希望这可以帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.