Skip to main content
edited body
Source Link
Luke Davis
  • 1.4k
  • 11
  • 26

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 remapsmappings specific to the plugin plugin_name would be wrapped in this if statement:

if index(plugin_list, 'plugin_name') != -1
  <special remapsmaps here>
endif

The index command returns -1 if the string 'plugin_name' is not contained in the list plugin_list.

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.

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 mappings specific to the plugin plugin_name would be wrapped in this if statement:

if index(plugin_list, 'plugin_name') != -1
  <special maps here>
endif

The index command returns -1 if the string 'plugin_name' is not contained in the list plugin_list.

edited body
Source Link
Luke Davis
  • 1.4k
  • 11
  • 26

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 stringlist or a string, not the panel that :PlugStatus brings up. For example: with a lista list of activated plugins, any remaps specific to the plugin pluginnameplugin_name would be wrapped in this if statement:

if index(pluginlist, "pluginname")!=-1
  <special remaps here>
endif
if index(plugin_list, 'plugin_name') != -1
  <special remaps here>
endif

The index command returns -1 if the string "pluginname"'plugin_name' is not contained in the list pluginlistplugin_list.

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 pluginname would be wrapped in this if statement:

if index(pluginlist, "pluginname")!=-1
  <special remaps here>
endif

The index command returns -1 if the string "pluginname" is not contained in the list pluginlist.

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.

added 392 characters in body
Source Link
Luke Davis
  • 1.4k
  • 11
  • 26

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 pluginname would be wrapped in this if statement:

if index(pluginlist, "pluginname")!=-1
  <special remaps here>
endif

The index command returns -1 if the string "pluginname" is not contained in the list pluginlist.

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?

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 pluginname would be wrapped in this if statement:

if index(pluginlist, "pluginname")!=-1
  <special remaps here>
endif

The index command returns -1 if the string "pluginname" is not contained in the list pluginlist.

edited tags
Link
Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274
Loading
Source Link
Luke Davis
  • 1.4k
  • 11
  • 26
Loading