Oftentimes I'll want to put remaps in my .vimrc
that use plugin commands. When a plugin happens to not be installed, these remaps will result in errors. A simple workaround would be to put an if-statement around plugin-specific remaps that checks whether that plugin has been activated.
How can I do this with VimPlug? Does VimPlug store a list somewhere?
Edit, to clarify things: I need an actual list or a string, not the panel that :PlugStatus
brings up. For example: with a list of activated plugins, any remaps specific to the plugin plugin_name
would be wrapped in this if statement:
if index(plugin_list, 'plugin_name') != -1
<special remaps here>
endif
The index
command returns -1
if the string 'plugin_name'
is not contained in the list plugin_list
.