diff --git a/README.md b/README.md index 95c5ec0..e828552 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,9 @@ " The sparkup vim script is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} + Plugin 'tpope/vim-fugitive' + " Invalid a Plugin + Unplug 'tpope/vim-fugitive' " scripts from http://vim-scripts.org/vim/scripts.html Plugin 'L9' Plugin 'FuzzyFinder' diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 76d4d59..bdc5b38 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -8,6 +8,9 @@ com! -nargs=+ -bar Plugin \ call vundle#config#bundle() +com! -nargs=+ -bar Unplug +\ call vundle#config#unplug() + com! -nargs=? -bang -complete=custom,vundle#scripts#complete PluginInstall \ call vundle#installer#new('!' == '', ) @@ -30,7 +33,7 @@ com! -nargs=0 PluginDocs com! PluginUpdate PluginInstall! " Vundle Aliases -com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleInstall PluginList +com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleInstall PluginInstall com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleSearch PluginSearch com! -nargs=? -bang VundleClean PluginClean com! -nargs=0 VundleDocs PluginDocs diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 7bcf647..7930ed8 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -6,6 +6,19 @@ func! vundle#config#bundle(arg, ...) return bundle endf +func! vundle#config#unplug(arg, ...) + let bundle = vundle#config#init_bundle(a:arg, a:000) + let bundle_index=0 + for b in g:bundles + if bundle.name_spec == b.name_spec + call s:rtp_rm(b.rtpath) + unlet g:bundles[bundle_index] + break + endif + let bundle_index=bundle_index+1 + endfor +endf + func! vundle#config#init() if !exists('g:bundles') | let g:bundles = [] | endif call s:rtp_rm_a() diff --git a/test/vimrc b/test/vimrc index 13dd2e2..7d0cd33 100644 --- a/test/vimrc +++ b/test/vimrc @@ -52,6 +52,8 @@ Bundle '~/Dropbox/.gitrepos/utilz.vim.git' Bundle 'rstacruz/sparkup.git', {'rtp': 'vim/'} Bundle 'matchit.zip', {'name': 'matchit'} +UnPlug 'molokai' "make molokai invalid + " Camel case Bundle 'vim-scripts/RubySinatra'