DervishD wrote:
    Hi all :)

    I want to be able to NOT load the plugins in my system-wide runtime
directory, and instead loading my own set of plugins, and only those. So
far, I know that "set noloadplugins" will do the job, partially. This
won't load the default plugins in the $VIMRUNTIME/plugins directory, ok,
but then my own plugins won't be loaded from "~/.vim/plugins".

    Apart from sourcing them manually from my .vimrc (which is not
difficult), is there any other way of avoiding the loading of the
plugins in the runtime directory but load the ~/.vim/plugins ones? Of
course, a good way would be not installing the default plugins in the
first place, but I want them available for the rest of users in my
system (a fellow programmer, specially).

    Any help or suggestion is welcome, and thanks a lot in advance. If
the answer is in the user manual (which I haven't read entirely, I'm in
"usr_40.txt" right now), feel free to ignore me, I'll hit it sooner or
later.

    Raúl Núñez de Arenas Coronado


If you have a plugin in ~/.vim/plugins/ , and it is a new version (or even an old version -- careful there) of a "well-behaved" plugin already found in $VIMRUNTIME/plugins/ and/or in $VIM/vimfiles/plugins/ , then your plugin will run first, and the other one(s) will do nothing.

Why is that? The reason is, what I call "well-behaved plugins" all start with something like

        " FooBar plugin
        " Maintainer: John Doe <[EMAIL PROTECTED]>
        " Version: 0.0.3
        " Last change: 29 February 2004
        if exists("did_foobar_plugin")
                finish
        endif
        let did_foobar_plugin = 1

Your plugin runs first, and sets did_foobar_plugin. When $VIMRUNTIME/plugins/foobar.vim is sourced shortly thereafter, it finds the variable, and exits without having done anything.

The same method can be used (by setting some "plugin" variable in the vimrc) to disable one specific plugin.


Best regards,
Tony.

Reply via email to