vimconfigurationconfiguration-filesvim-plugin

How do I remove duplicates from vim :scriptnames file?


I'm trying to learn 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? what does :scriptnames tell you? thanks.

Which was the case for the OP and what looks to be for me too. 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.


Solution

  • Most Vim plugins consist of several script files. It is therefore normal to see multiple references in :scriptnames. In your output, the base Airline directory is ~/.vim/bundle/vim-airline; all of these base directories have a common substructure under them (usually autoload/... and plugin/...).

    What the owner meant was to check for multiple base directories, e.g. both ~/.vim/bundle/vim-airline and ~/.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. Shouldn't you then look for multiple installations of Mundo?!