On Mon, May 4, 2009 at 12:51 PM, Ben Fritz wrote:
>
> On May 4, 11:47 am, "Torsten A." wrote:
>> I checked the vim help and found the ~/.vim/after directory, which is
>> supposed to be scanned __after__ the plugins are loaded. I tried to add
>> my script setting the plugin path in the "after" directory, but the
>> script is never executed. Currently I got in ~/.vim/after/my_project.vim
>> only the lines
>>
>> :Project project.vim
>> :alsdjflajds
>
> Looks like you're very close!
>
> The after directory (for plugins) is ~/.vim/after/plugin, not directly
> in the after directory.
This is right...
> Additionally, you need to give your file the same name as the plugin
> script that exists in the ~/.vim/plugin directory.
But this isn't. This would be true for ftplugins or syntax files, but
not for plugins. The file can have any name at all, it will be
executed no matter what. Now, since you probably don't want it to
trigger unless the project.vim plugin exists and was loaded, you
probably want to start your after/plugin/foo.vim with something like
if !exists('Project')
finish " The :Project command isn't available! Bail!
endif
~Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---