I am new to Vim plugins and am looking to use the vim-plug
plugin manager. The installation instruction advises me to download the .vim
file and add it to ~/.vim/autoload
.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
This answer suggests that vim-plug
is itself a plugin. However, several answers have suggested placing plugins that comes as a single .vim
file in the ~/.vim/plugin
directory.
I understand that some directories under ~/.vim
has special meaning. The ~/.vim/autoload
directory is to house autoload scripts that are invoked when the function is ran. These functions can be ran by plugins or just used generally. The ~/.vim/plugin
directory are for plugin scripts, which are sourced by Vim when it starts up.
So why should the plug.vim
script be added to the autoload
directory and not plugin
?