On 2008-11-13, Hari <[EMAIL PROTECTED]> wrote:
> A plugin has commands:
> 
> MyPluginCommand1
> MyPluginCommand2
> 
> I want to run these commands in an init script after my plugin has finished
> loading. Putting these in .gvimrc seems to work fine as its processed after
> all the plugins are finished loading, but .vimrc wouldn't work as it is
> loaded first. I browsed through the startup help files -- they mention the
> 'plugin/after' directory; however that ends up being processed before the
> plugin loads as well. Can someone please point me to how this is usually
> done?

If you put a plugin named a.vim in the plugin directory, and another 
plugin named a.vim in the after/plugin directory, the one in the 
plugin directory will be loaded and its commands executed before 
those in after/plugin/a.vim.  There is no "plugin/after" directory.  
Maybe that's the problem.

Also, if you want those commands executed after the plugin loads, 
all you should have to do is put the commands at the bottom of the 
plugin.  They will be the last commands executed after the plugin 
has loaded.

If for some reason that doesn't get you the behavior you're looking 
for, you can put an autocommand like this in your ~/.vimrc:

    au VimEnter * MyPluginCommand1 | MyPluginCommand2

I think that autocommand event is the last one executed when vim 
starts.

Regards,
Gary


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to