Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
feat(plug): add options to add / disable a set of plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
LER0ever committed Feb 10, 2018
1 parent aad7061 commit 29edfeb
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions plugins/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,29 @@
endif
endif

if !exists('g:override_evervim_bundles')
for $bundle_group in g:evervim_bundle_groups
source $evervim_root/plugins/$bundle_group/$bundle_group.bundles
endfor
if exists('g:override_evervim_bundles')
" Disable a specific plugin
" https://github.com/junegunn/vim-plug/issues/469#issuecomment-226965736
function! s:evervim_disable_plugin(repo)
let repo = substitute(a:repo, '[\/]\+$', '', '')
let name = fnamemodify(repo, ':t:s?\.git$??')
call remove(g:plugs, name)
call remove(g:plugs_order, index(g:plugs_order, name))
endfunction

command! -nargs=1 -bar UnPlug call s:evervim_disable_plugin(<args>)
endif

for $bundle_group in g:evervim_bundle_groups
source $evervim_root/plugins/$bundle_group/$bundle_group.bundles
endfor

" Run PlugInstall if bundle does not exists
autocmd VimEnter * call EverVimInitPlugins()
" }

" Use local bundles config if available {
if filereadable(expand("~/.EverVim.bundles"))
if exists('g:override_evervim_bundles') && filereadable(expand("~/.EverVim.bundles"))
source ~/.EverVim.bundles
endif
" }
Expand Down

0 comments on commit 29edfeb

Please sign in to comment.