Home Explore Blog CI



neovim

4th chunk of `runtime/doc/repeat.txt`
eb0c1e236759de45e9e7c5fdb22872c880f7667f630df8e90000000100000fa4

			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

Title: :runtime Details, :packadd, :packloadall, and :scriptencoding
Summary
This section delves into the specifics of the :runtime command, including how it searches for files in 'packpath' and how wildcards are expanded. It explains the :packadd command, which searches for and loads optional plugins from the 'packpath', and how it affects the 'runtimepath'. Furthermore, it introduces the :packloadall command for loading all packages in the 'start' directory under 'packpath'. Finally, it describes :scriptencoding, which specifies the character encoding used in a script and converts lines to the 'encoding' option.