adding global variables to disable every bundle #215

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

jamestomasino commented Nov 14, 2012

This has come up before in several issues. I think it would be incredibly useful to have a variable capable of disabling any Bundle installed in spf13-vim. Since not every Bundle has an internal mechanism capable of doing this cleanly and they are all handled inconsistently when available, it seemed the best place to do this was in .vimrc.bundles.

I've kept a similar naming convention to existing disable variables.

g:override_spf13_bundle_{Bundle_Name_With_Underscore_Seperator}

For example:

g:override_spf13_bundle_vim_nerdtree_tabs
Owner

spf13 commented Nov 14, 2012

I think this is a very interesting idea. I'd like to think about it a bit before merging it in. If we don't merge this in directly it will be something very similar based on it. Thanks for the commit.

Owner

spf13 commented Nov 16, 2012

Thinking about this more, I like it, but the name seems incorrect. 'g:override_spf13_bundle_' ... override implies that we are providing something else instead.

I think we should use the term 'g:spf13_disable_bundle_*' instead. I think it's much more descriptive.

We also should add documentation for users to add this to their .vimrc.bundles.local file.

I'm thinking there may be a way to automate this as well. I'm looking into it.

Contributor

jamestomasino commented Nov 16, 2012

That's a great idea. I can update the variable names in my pull request branch if you'd like, or I can hold off if you think there's a way of automating the checks.

Collaborator

johntyree commented Nov 23, 2012

This has my vote. I've already had to replicate (and now maintain) two of these little bundle groups because I just wanted to remove one bundle from each.

What about a list of bundle names that should be disabled? Then you have one global variable and you can just do string comparison or something. The name strings are already well defined by .vimrc.bundles anyway..

Owner

spf13 commented Nov 23, 2012

This is what I'm thinking of, just need time to do it.

Steve Francia
@spf13

On Thursday, November 22, 2012 at 10:23 PM, John Tyree wrote:

This has my vote. I've already had to replicate (and now maintain) two of these little bundle groups because I just wanted to remove one bundle from each.
What about a list of bundle names that should be disabled? Then you have one global variable and you can just do string comparison or something. The name strings are already well defined by .vimrc.bundles anyway..


Reply to this email directly or view it on GitHub (#215 (comment)).

Owner

spf13 commented Nov 27, 2012

The commit 2d1b8f3 has the same functionality but in a different interface. I feel that this interface is much better as it follows the same interface as Bundle already does and doesn't add any additional maintenance.

It worked well for me, but please test it and let me know if it works for you.

Important to note is don't add the UnBundle to your .vimrc.bundles.local as it loads too early and will just result in the bundle being re-enabled.

spf13 closed this Nov 27, 2012

Contributor

jamestomasino commented Nov 28, 2012

Absolutely brilliant. Thanks Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment