mirror of
https://github.com/junegunn/vim-plug
synced 2026-05-21 17:27:57 -04:00
Deferred loading on autocmd (#event[#pattern])
e.g.
Plug 'SirVer/ultisnips', { 'on': '#InsertEnter' }
Plug 'junegunn/goyo.vim', { 'on': ['Goyo', '#BufEnter#README'] }
This commit is contained in:
23
README.md
23
README.md
@@ -121,16 +121,16 @@ Reload .vimrc and `:PlugInstall` to install plugins.
|
||||
|
||||
### `Plug` options
|
||||
|
||||
| Option | Description |
|
||||
| ----------------------- | ------------------------------------------------ |
|
||||
| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use |
|
||||
| `rtp` | Subdirectory that contains Vim plugin |
|
||||
| `dir` | Custom directory for the plugin |
|
||||
| `as` | Use different name for the plugin |
|
||||
| `do` | Post-update hook (string or funcref) |
|
||||
| `on` | On-demand loading: Commands or `<Plug>`-mappings |
|
||||
| `for` | On-demand loading: File types |
|
||||
| `frozen` | Do not update unless explicitly specified |
|
||||
| Option | Description |
|
||||
| ----------------------- | ----------------------------------------------------------- |
|
||||
| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use |
|
||||
| `rtp` | Subdirectory that contains Vim plugin |
|
||||
| `dir` | Custom directory for the plugin |
|
||||
| `as` | Use different name for the plugin |
|
||||
| `do` | Post-update hook (string or funcref) |
|
||||
| `on` | On-demand loading: Commands, `<Plug>`-mappings, or #autocmds |
|
||||
| `for` | On-demand loading: File types |
|
||||
| `frozen` | Do not update unless explicitly specified |
|
||||
|
||||
### Global options
|
||||
|
||||
@@ -180,6 +180,9 @@ Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
||||
" Multiple file types
|
||||
Plug 'kovisoft/paredit', { 'for': ['clojure', 'scheme'] }
|
||||
|
||||
" On autocmd
|
||||
Plug 'SirVer/ultisnips', { 'on': '#InsertEnter' }
|
||||
|
||||
" On-demand loading on both conditions
|
||||
Plug 'junegunn/vader.vim', { 'on': 'Vader', 'for': 'vader' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user