diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 55c7d7d..a2ff68d 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -101,6 +101,11 @@ endf let s:bundle = {} func! s:bundle.path() - return s:expand_path(g:bundle_dir.'/'.self.name) + if exists('self.dir') + let dir = self.dir + else + let dir = self.name + endif + return s:expand_path(g:bundle_dir.'/'.dir) endf diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 036a756..d94fb77 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -100,7 +100,8 @@ endf func! vundle#installer#install(bang, name) abort if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif - let b = vundle#config#init_bundle(a:name, {}) + let n = substitute(a:name,"['".'"]\+','','g') + let b = filter(copy(g:bundles), 'v:val.name_spec == n')[0] return s:sync(a:bang, b) endf diff --git a/doc/vundle.txt b/doc/vundle.txt index 57e7260..4878f55 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -64,8 +64,8 @@ in order to install/search [all available vim scripts] " My Bundles here: " " original repos on github - Bundle 'tpope/vim-fugitive' - Bundle 'Lokaltog/vim-easymotion' + Bundle 'tpope/vim-fugitive', {'dir': 'plugin-fugitive'} + Bundle 'Lokaltog/vim-easymotion', {'dir': 'plugin-easymotion'} Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} " vim-scripts repos Bundle 'L9' @@ -99,6 +99,12 @@ command in `.vimrc`: > or > Bundle 'script_name' " 'script-name' should be an official script name (see |vundle-scripts-search| ) +If you want install script into a specific directory under bundle, a dictionary +contains the desired directory name with key 'dir' could be appended to the +`Bundle` command. + + Bundle 'git_repo_uri', {'dir':'install_dir'} " the script will be installed at 'bundle/install_dir' + Vundle loves Github, that's why short uris can be used with commands: > Bundle 'tpope/vim-fugitive'