Updated faq (markdown)

Junegunn Choi 2014-08-11 08:07:38 -07:00
parent 14b6069438
commit 96e68c585d

8
faq.md

@ -68,14 +68,16 @@ Yes, it automatically generates help tags for all of your plugins whenever you r
### Loading plugins manually
With `on` and `for` options, vim-plug allows you to defer loading of plugins. But if you want a plugin to be loaded on an event that is not supported by vim-plug, you can set `on` or `for` option to an empty list, and use `plug#load(names...)` function later to load the plugin manually. The following example will load [ultisnips](https://github.com/SirVer/ultisnips) first time you enter insert mode.
With `on` and `for` options, vim-plug allows you to defer loading of plugins. But if you want a plugin to be loaded on an event that is not supported by vim-plug, you can set `on` or `for` option to an empty list, and use `plug#load(names...)` function later to load the plugin manually. The following example will load [ultisnips](https://github.com/SirVer/ultisnips) and [YouCompleteMe](https://github.com/Valloric/YouCompleteMe) first time you enter insert mode.
```vim
" Load on nothing
Plug 'SirVer/ultisnips', { 'on': [] }
Plug 'Valloric/YouCompleteMe', { 'on': [] }
augroup load_ultisnips
augroup load_ycm
autocmd!
autocmd InsertEnter * call plug#load('ultisnips') | autocmd! load_ultisnips
autocmd InsertEnter * call plug#load('ultisnips', 'YouCompleteMe')
\| call youcompleteme#Enable() | autocmd! load_ycm
augroup END
```