If your vim distribution uses vim-plug
and includes plugins you don't want, or if you want to simply maintain a single set of plugins but disable some on certain machines, this may be for you.
let g:plugs_disabled = []
function! plug_disable#commit()
for name in g:plugs_disabled
if has_key(g:plugs, name)
call remove(g:plugs, name)
endif
let idx = index(g:plugs_order, name)
if idx > -1
call remove(g:plugs_order, idx)
endif
endfor
endfunction
let g:plugs_disabled = ['nerdtree']
call plug#begin()
Plug 'scrooloose/nerdtree'
Plug 'mileszs/ack.vim'
call plug_disable#commit()
call plug#end()