Let the site a short form URL gets expanded into be customised #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Right now if you want to use something other than GitHub over HTTPS to get plugins you need to specify the full URL; if you want to do this with more than one or two plugins it will get messy. This PR adds a two keys to the config dictionary for
minpac#init
and one key to the config forminpac#add
that try to fix this problem.Use cases
minpac#add
, which makes for a cleaner vimrc/init.vimWhat's been added
The keys for
minpac#init
are'site'
and'sites'
.'sites'
is a dictionary whose keys are short names for sites, and whose values are the base url for the corresponding site; the default names are include'github'
, whose value is'https://github.com/'
. See the code for the others.'site'
is a key from the'sites'
dictionary, default'github'
. This is used as the default site for short form URLs passed tominpac#add
.The key for
minpac#add
is also a key from the'sites'
dictionary, and overrides the value set byminpac#init
.I've also added tests for the new configuration options.
To-do
This will probably need documentation before it's merged.