Other values:
START search only under "start" in 'packpath'
OPT search only under "opt" in 'packpath'
PACK search under "start" and "opt" in
'packpath'
ALL first use 'runtimepath', then search
under "start" and "opt" in 'packpath'
When {file} contains wildcards it is expanded to all
matching files. Example: >
:runtime! plugin/**/*.{vim,lua}
< This is what Nvim uses to load the plugin files when
starting up. This similar command: >
:runtime plugin/**/*.{vim,lua}
< would source the first file only.
For each {file} pattern, if two `.vim` and `.lua` file
names match and differ only in extension, the `.vim`
file is sourced first.
When 'verbose' is one or higher, there is a message
when no file could be found.
When 'verbose' is two or higher, there is a message
about each searched file.
*:pa* *:packadd* *E919*
:pa[ckadd][!] {name} Search for an optional plugin directory in 'packpath'
and source any plugin files found. The directory must
match:
pack/*/opt/{name} ~
The directory is added to 'runtimepath' if it wasn't
there yet.
If the directory pack/*/opt/{name}/after exists it is
added at the end of 'runtimepath'.
If loading packages from "pack/*/start" was skipped,
then this directory is searched first:
pack/*/start/{name} ~
Note that {name} is the directory name, not the name
of the .vim file. All files matching the patterns
pack/*/opt/{name}/plugin/**/*.vim ~
pack/*/opt/{name}/plugin/**/*.lua ~
will be sourced. This allows for using subdirectories
below "plugin", just like with plugins in
'runtimepath'.
If the filetype detection was already enabled (this
is usually done with a `syntax enable` or `filetype on`
command in your |vimrc|, or automatically during
|initialization|), and the package was found in
"pack/*/opt/{name}", this command will also look
for "{name}/ftdetect/*.vim" files.
When the optional ! is added no plugin files or
ftdetect scripts are loaded, only the matching
directories are added to 'runtimepath'. This is
useful in your |init.vim|. The plugins will then be
loaded during |initialization|, see |load-plugins| (note
that the loading order will be reversed, because each
directory is inserted before others). In this case, the
ftdetect scripts will be loaded during |initialization|,
before the |load-plugins| step.
Also see |pack-add|.
*:packl* *:packloadall*
:packl[oadall][!] Load all packages in the "start" directory under each
entry in 'packpath'.
First all the directories found are added to
'runtimepath', then the plugins found in the
directories are sourced. This allows for a plugin to
depend on something of another plugin, e.g. an
"autoload" directory. See |packload-two-steps| for
how this can be useful.
This is normally done automatically during startup,
after loading your |vimrc| file. With this command it
can be done earlier.
Packages will be loaded only once. Using
`:packloadall` a second time will have no effect.
When the optional ! is added this command will load
packages even when done before.
Note that when using `:packloadall` in the |vimrc|
file, the 'runtimepath' option is updated, and later
all plugins in 'runtimepath' will be loaded, which
means they are loaded again. Plugins are expected to
handle that.
An error only causes sourcing the script where it
happens to be aborted, further plugins will be loaded.
See |packages|.
:scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167*
Specify the character encoding used in the script.
The following lines will be converted from [encoding]
to the value of the 'encoding' option, if they are
different. Examples: >
scriptencoding iso-8859-5
scriptencoding cp932
<
When [encoding] is empty, no conversion is done. This
can be used to restrict conversion