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

Make bundle options visible to installer #406

Merged
merged 1 commit into from
Mar 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autoload/vundle/config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func! vundle#config#init_bundle(name, opts)
if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '')
echo "Spurious leading and/or trailing whitespace found in bundle spec '" . a:name . "'"
endif
let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')))
let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep')
let b = extend(opts, copy(s:bundle))
let b.rtpath = s:rtpath(opts)
return b
Expand Down
31 changes: 27 additions & 4 deletions doc/vundle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,39 @@ follow on the same line as the command. Example:
>
Bundle 'git_URI'

There can also be a second argument after URI. It has to be a dictionary with
a key called 'rtp'. The value for that key is a directory inside the
repository (relative path from the root of the repository) where the vim
plugin resides. For example:
The `Bundle` command can optionally take a second argument after the URI. It
has to be a dictionary, separated from the URI by a comma. Each key-value pair
in the dictionary is a configuration option.

The following per-script configuration options are available.

The 'rtp' option
----------------

Specifies a directory inside the repository (relative path from the root of
the repository) where the vim plugin resides. It determines the path that will
be added to the |runtimepath|.

For example:
>
Bundle 'git_URI', {'rtp': 'some/subdir/'}

This can be used with git repositories that put the vim plugin inside a
subdirectory.

The 'name' option
-----------------

The name of the directory that will hold the local clone of the configured
script.

For example:
>
Bundle 'git_URI', {'name': 'newPluginName'}

This can be used to prevent name collisions between plugins that Vundle would
otherwise try to clone into the same directory. It also provides an additional
level of customisation.

3.2 SUPPORTED URIS ~
*vundle-uris*
Expand Down
1 change: 1 addition & 0 deletions test/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Bundle '~/Dropbox/.gitrepos/utilz.vim.git'

" with options
Bundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
Bundle 'matchit.zip', {'name': 'matchit'}

" Camel case
Bundle 'vim-scripts/RubySinatra'
Expand Down