Update documentation

This commit is contained in:
Junegunn Choi 2014-07-27 11:06:47 +09:00
parent aa49c38586
commit b2208640d4
2 changed files with 45 additions and 2 deletions

View File

@ -120,6 +120,42 @@ Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'junegunn/vader.vim', { 'on': 'Vader', 'for': 'vader' }
```
### Post-installation/update hooks
There are some plugins that require extra steps after installation or update.
In that case, use `do` option to describe the task to be performed.
```vim
Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' }
```
If you need more control, you can pass a reference to a Vim function instead.
```vim
function! BuildYCM()
" ...
endfunction
Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') }
```
Both forms of post-update hook are executed inside the directory of the plugin.
Make sure to escape BARs when you write `do` option inline as they are
mistakenly recognized as command separator for Plug command.
```vim
Plug 'junegunn/fzf', { 'do': 'yes \| ./install' }
```
But you can avoid the escaping if you extract the inline specification using a
variable (or any Vimscript expression) as follows:
```vim
let g:fzf_install = 'yes | ./install'
Plug 'junegunn/fzf', { 'do': g:fzf_install }
```
### Dependency resolution
See [Dependency
@ -186,6 +222,13 @@ it as "unstable" or "in development", and always use its latest revision.
If you really must choose a certain untagged revision, consider forking the
repository.
#### Migrating from other plugin managers
vim-plug does not require any extra statement other than `plug#begin()` and
`plug#end()`. You can remove `filetype off`, `filetype plugin indent on` and
`syntax on` from your .vimrc as they are automatically handled by
`plug#end()`.
### License
MIT

View File

@ -30,8 +30,8 @@
"
" call plug#end()
"
" Then :PlugInstall to install plugins. (default: ~/.vim/plugged)
" You can change the location of the plugins with plug#begin(path) call.
" Then reload .vimrc and :PlugInstall to install plugins.
" Visit https://github.com/junegunn/vim-plug for more information.
"
"
" Copyright (c) 2014 Junegunn Choi