Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide method to explicitly remove Bundle from list #236

Closed
jamestomasino opened this issue Nov 9, 2012 · 6 comments
Closed

Provide method to explicitly remove Bundle from list #236

jamestomasino opened this issue Nov 9, 2012 · 6 comments

Comments

@jamestomasino
Copy link

Adding a Bundle is as easy as listing it, but removing them is much more difficult. You have the clean method which does a fine job of cleaning up unused bundles, but I'd like to have a method for explicitly removing a Bundle from the list.

Example

Lets say I have a .vimrc.bundles file with the following:

Bundle 'sjl/gundo.vim'
Bundle 'hail2u/vim-css3-syntax'
Bundle 'AfterColors.vim'

Now, that's great in most of my environments, but on this one particular system, I don't want to have gundo installed. I don't want to modify my .vimrc.bundles file, which is being kept up to date via verson control. I want to override the list with .vimrc.bundles.local instead.

I'm looking for some way to signify, "pretend the Bundle 'sjl/gundo.vim' line didn't happen".

Perhaps:

Bundle! 'sjl/gundo.vim'

or:

BundleRemove 'sjl/gundo.vim'
@jdevera
Copy link
Contributor

jdevera commented Nov 26, 2012

You can remove the two directories Bundle puts in &runtimetipath from same. For example:

set rtp-=/home/jamestomasino/.vim/bundle/gundo.vim
set rtp-=/home/jamestomasino/.vim/bundle/gundo.vim/after

You can write a function to get those paths from the Bundle name and create your own command to do this. I'm suggesting this alternative approach because I'm not sure that such a change will make it in.

Any thoughts?

@weynhamz
Copy link
Contributor

This is more like to be a problem about how to organize your vimrc configurantion, maybe add a check to see if a .vimrc.bundles.local file is already exists. If so, load it instead.

@weynhamz
Copy link
Contributor

Many plugins depend on loaded_* variable to determine if the plugin should be loaded, maybe you could set let loaded_gundo = 1 (I guess, read the doc or source for real variable) to stop gundo from being loaded in your local vimrc file without altering Vundle.

@mbixby
Copy link

mbixby commented Jun 20, 2013

+1

@MarcWeber
Copy link

How to solve this issue? Add a let g:use_these_plugins_on_this_setup = 1 and depending on that setting use Bundle that plugin or not. https://github.com/MarcWeber/vim-addon-MarcWeber/blob/master/autoload/vim_addon_MarcWeber.vim#L4 shows how this can be done (this is for VAM, but the same could be done for vundle). Depending on features different sets of plugins will be activated. Also have a look at #364 which tells about lazy loading

@jdevera
Copy link
Contributor

jdevera commented Feb 12, 2014

Closing this, as it can be easily done with just some vimrc organisation, and some alternative solutions have been provided.

@jdevera jdevera closed this as completed Feb 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants