Closed niklaas closed 5 years ago
In you .vimrc you can check if the executable exists before loading the plugin.
I use vim-plug to manage my plugins.
if executable('gtm')
Plug 'git-time-metric/gtm-vim-plugin'
endif
Of course! I have this in my .vimrc
anyway:
" Conditional activation for vim-plug plugins
" https://github.com/junegunn/vim-plug/wiki/tips#conditional-activation
function! Cond(cond, ...)
let opts = get(a:000, 0, {})
return a:cond ? opts : extend(opts, { 'on': [], 'for': [] })
endfunction
So it's as simple as
Plug 'git-time-metric/gtm-vim-plugin', Cond(executable('gtm'))
Could have come up with that myself. Thank you!
I use
vim
on more machines that I usegtm
. Sogtm
isn't always installed. Is there some way to silent the annoying complaint thatgtm
cannot be found whenvim
is started?