From 1e96cc60736f18f3329e4f18512a9734135a3a51 Mon Sep 17 00:00:00 2001 From: Marcel Bischoff Date: Tue, 27 Jun 2017 02:55:29 +0200 Subject: [PATCH] Add operating system specific plugins and options section --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index e9da75a..760d6b8 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,22 @@ let g:fzf_install = 'yes | ./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!` The installer takes the following steps when installing/updating a plugin: