Vim Recall繁體中文

Add a plugin from 'packpath'

:packadd

Example

Normal 0 / 2

Add a plugin from 'packpath'.

Package state

colors
not loaded
runtimepath
does not include colors
g:accent
unset
Before & after

Before

Package state

colors
not loaded
runtimepath
does not include colors
g:accent
unset

After

Package state

colors
loaded
runtimepath
includes /demo/packs/pack/demo/opt/colors
g:accent
blue

Subject: :packadd. Documentation-backed illustration; assumes +eval, displayed package fixture, loadplugins set; packages have not already been loaded; not replay-verified. Adds the optional colors package to runtimepath and sources its plugin file.

Sample buffer
notes
Cursor on line 1, column 1
Details & Vim help

Add a plugin from 'packpath'. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :pa[ckadd] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.