> I'm writing a plugin and want it to depend on another plugin installed. At 
> the moment I just have a line
> 
> source <path to plugin>

I sometimes use something like this:

    if !exists('g:loaded_DEPENDENCY') || g:loaded_DEPENDENCY < 100
        runtime plugin/DEPENDENCY.vim
        if !exists('g:loaded_DEPENDENCY') || g:loaded_DEPENDENCY < 100
            echoerr 'DEPENDENCY >= 1.00 is required'
            finish
        endif
    endif

This makes sure plugin/DEPENDENCY.vim is loaded. The file has to be in the 
runtimepath. This solution is suboptimal if g:loaded_DEPENDENCY < 100 though.

Regards

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to