mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-24 04:56:33 -07:00
Add operating system specific plugins and options section
This commit is contained in:
parent
802b100415
commit
1e96cc6073
16
README.md
16
README.md
@ -261,6 +261,22 @@ let g:fzf_install = 'yes | ./install'
|
|||||||
Plug 'junegunn/fzf', { 'do': g:fzf_install }
|
Plug 'junegunn/fzf', { 'do': g:fzf_install }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Operating system specific plugins and options
|
||||||
|
|
||||||
|
While this functionality is not built into the plugin, you can easily archieve this with Vim's own commands. For example configuring the post-update hooks for `vimproc` differently on FreeBSD:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
let g:os=substitute(system('uname'), '\n', '', '')
|
||||||
|
|
||||||
|
if g:os ==# 'FreeBSD'
|
||||||
|
Plug 'Shougo/vimproc', { 'do': 'gmake' }
|
||||||
|
else
|
||||||
|
Plug 'Shougo/vimproc', { 'do': 'make' }
|
||||||
|
endif
|
||||||
|
```
|
||||||
|
|
||||||
|
This approach enables you to build whatever complex plugin sets you need, depending on setting a global variable.
|
||||||
|
|
||||||
### `PlugInstall!` and `PlugUpdate!`
|
### `PlugInstall!` and `PlugUpdate!`
|
||||||
|
|
||||||
The installer takes the following steps when installing/updating a plugin:
|
The installer takes the following steps when installing/updating a plugin:
|
||||||
|
Loading…
Reference in New Issue
Block a user