I have powerline installed on some of my computers, but not on others. I'd like my .vimrc to detect if it is installed before trying to load/enable the powerline package so I can avoid the errors that are generated.
How can I detect if powerline is installed?
I should note that I use Vundle as my Vim package manager.
I do not use powerline, but this is the generic method.
Assuming you using Vim's packages you move your extra plugins to be optional packages and then just use
:silent!when doing:packaddin yourvimrc.Alternatively you can use
exists()&VimEnterautocmd if you need something more complex.NOTE: I do not use powerline so I do not know what commands or variables are provided to use. It could provide a custom
autocmdevent to simplify this or have some other method for loading related plugins.For more help see: