I installed ubuntu-20.04.3-desktop-amd64.iso on VirtualBox 6.1.28. It is my first foray into virtual machines and Linux.

I installed Vim 8.1 according to this page. The :scriptnames command shows that the first of the following two files doesn't load, even though the second one does:

  • /usr/share/vim/addons/plugin/bufexplorer.vim,
  • /usr/share/vim/addons/plugin/ChristiansHi20150126.vim [1]

In unix file access vernacular, both files have "read" permission for "group" and "other".

What would cause this?

My Vim 8.2 on Cygwin loads both plugins just fine, and I've been using both for many years, through various versions of Vim. For Vim 8.2 on Cygwin, the plugin folder is a subfolder of /usr/share/vim/vimfiles.

P.S. I want to use this old version of bufexplorer because I've hacked it to display ~/ instead of /home/User.Name/, which makes better use of limited screen space.


[1] Code adapted from a usenet contributor

  • 1
    If found that creating a symbolic link from vimfiles to addons causes the plugins to be loaded. So the reason why one of the two files above appeared to be loaded was probably because I manually sourced it, or some-such. More web searching reveals that there is an entire layer of vim-addon management of which I was unaware. Nov 1, 2021 at 23:49
  • 1
    The list of directories under which Vim will look for plugin/*.vim can be found in the 'runtimepath' variable, which you can see with :set rtp?. The documentation indicates it typically includes $VIM/vimfiles by default, but not $VIM/addons. I wonder if an older version of Vim used to use addons? Or maybe a specific Linux/Unix distribution of Vim used to customize to include that directory? In any way, you could update your vimrc to include $VIM/addons in that list, or move your files to the locations Vim recognizes...
    – filbranden
    Nov 2, 2021 at 0:01
  • @filbranden: You're right, rtp points to /etc/vim/vimfiles. The addons folder might be left over from the vim tiny that came with Ubuntu. I can't even invoke it anymore to check its rtp. The Bash command where -a vim shows two locations, both pointing to /etc/alternatives/vim, which points to /etc/bin/vim.gtk3. The only other Vim-like files in /etc/alternatives is vimdiff, which also points to /etc/bin/vim.gtk3. Is your comment worth posting as an answer, or should this question be removed? Nov 2, 2021 at 0:22
  • Yes, I'll post that as an answer. I find it a bit odd that vim tiny would consider addons as a valid runtime directory, but on the other hand it's definitely plausible... Let me dig a little deeper to see if I can find something that may have configured that name somewhere to make a somewhat better hypothesis. Thanks!
    – filbranden
    Nov 2, 2021 at 16:21
  • 1
    There are other possible explanations for the addons folder. It might have to do with the vim-addon-manager and/or might have come with the Ubuntu ISO image. It might have been installed when I installed Vim. Nov 3, 2021 at 0:35


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.