What you're probably looking for is a plugin manager.

I know that with the "Vizardry" plugin manager, you can enable/disable plugins 
by name from inside vim as well as list which plugins you have enabled/disabled.

The one caveat is that for Vizardry, and probably most other plugin managers as 
well, disabling a plugin doesn't take full effect until after you restart Vim 
for the reasons Gary mentioned. I've been considering adding the ability to 
hard refresh(dump all maps, autocmds, etc and reload them from the 
plugins/vimrc) to work around this if that's something people would find useful.

-James


On Wednesday, February 12, 2014 7:21:03 PM UTC-5, Gary Johnson wrote:
> On 2014-02-12, Eduardo LĂșcio Amorim Costa wrote:
> 
> > I would like to do some tricks with VIM and so I ask the help of you guys!
> 
> > 
> 
> > It is possible to detect whether a plugin is active/running/open?
> 
> > You can close a plugin by its name?
> 
> > You can close a plugin when it loses focus?
> 
> > The goal is to create keyboard shortcuts (conditional) to be
> 
> > configured in "vimrc" so I can easily switch between plugins!
> 
> 
> 
> I think you may need to learn a little more about plugins.  See
> 
> 
> 
>     :help plugin
> 
>     :help write-plugin
> 
> 
> 
> It may also help to read a few plugins by the better authors.
> 
> 
> 
> Plugins are not "opened" or "closed".  They are collections of ex
> 
> commands that are sourced (or loaded) pretty much as though they
> 
> were typed at the keyboard.  They usually define a set of functions,
> 
> commands, mappings and/or autocommands that are later executed by
> 
> the user, either directly or in response to some event.
> 
> 
> 
> Similarly, plugins do not "run" except as any Vim command or
> 
> function "runs" when it is executed.
> 
> 
> 
> There is normally no need to switch between plugins unless some
> 
> mapping is used by more than one plugin.  Such conflicts have to be
> 
> handled case by case.
> 
> 
> 
> Some plugins such as DrawIt can be put in an "on" or "off" state,
> 
> which changes certain Vim options and how certain keys are
> 
> interpreted, but such plugins are the exception.
> 
> 
> 
> Otherwise, the only way to remove the functionality of a plugin is
> 
> to remove some or all of its components.  Most plugins do not
> 
> provide a means to do this because there is usually no need.  If a
> 
> user doesn't want to use the features of a plugin, he either simply
> 
> doesn't invoke them or he doesn't install the plugin in the first
> 
> place.
> 
> 
> 
> Now for the usual question at this point in the discussion:  What
> 
> problem are you trying to solve?
> 
> 
> 
> Regards,
> 
> Gary

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui