Problem installing plugins

I found an article on configuring Vim for php. As it is written there, plugins (files with the *.vimformat) must be placed in the

folder

~/.vim/plugin

I didn’t have such a folder. Vim’s plugin directory turned out to be:

/usr/share/vim/addons/plugin

I downloaded NERD Tree(plugin for vim), copied it to this directory. Then I started Vim and nothing changed there. Tell me what’s the problem? Am I doing something wrong or what do I need to press? Thanks in advance.


Answer 1, authority 100%

Try putting it in /usr/share/vim/vimXX/plugin, where XX is the version number of your editor. Better yet, do as recommended. ~/.vim is the directory where vim files are stored for you personally as a specific user. Accordingly, ~/.vim/plugin is the plugins installed for you personally, and ~/.vim/doc is your help. You can also add :helptags ~/.vim/docto create tags for your NERD_tree.txt.


Answer 2, authority 100%

If you use a package manager (that is, you install vim from packages), then you definitely shouldn’t put personal plugins in the system directories. If you don’t have a ~/.vim/plugin, create it, as vim doesn’t create these directories. That is, you need to do:

mkdir -p ~/.vim/plugin ~/.vim/doc
cp plugin/NERD_tree.vim ~/.vim/plugin/
cp doc/NERD_tree.txt ~/.vim/doc/

Answer 3, authority 100%

Probably the best option for you is to take a ready-made tool that will install all the plugins and update them in the future.
I personally use vundle. This page describes in detail how to install it and how to prescribe plugins. And he will download, install and configure.