These are high-level notes on how to use Vim's native package manager.
It has been available since Vim v8.
Read the manual with :help packages
.
Many people use git-submodules for package management.
What does Vim do when Vim starts?
- Process your
.vimrc
file, and then load plugins as follows. - Scan for directories under
pack/*/start/
(these are the plugins). - Add those directories to
runtimepath
. - Load the associated plugins.
- If appropriate, load the appropriate syntax.
Running packloadall
in .vimrc
will load plugins earlier.
Directory structure:
~/.vim
pack/
<packageName1>/
README
start/ <-------- loaded automatically
<pluginName1>/
plugin/ <------- the plugin files
syntax/ <------- its syntax files
<pluginName2>/
plugin/
syntax/
opt/ <----------- loaded optionally
<pluginName3>/
plugin/
syntax/
<pluginName4>/
plugin/
syntax/