Implement g:plug_url_format (#62)

This commit is contained in:
Junegunn Choi
2014-08-26 01:36:50 +09:00
parent 3572ffde79
commit ab3bd3b17c
3 changed files with 22 additions and 7 deletions

View File

@@ -379,7 +379,8 @@ function! s:infer_properties(name, repo)
if repo !~ '/'
let repo = 'vim-scripts/'. repo
endif
let uri = 'https://git::@github.com/' . repo . '.git'
let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git')
let uri = printf(fmt, repo)
endif
let dir = s:dirpath( fnamemodify(join([g:plug_home, a:name], '/'), ':p') )
return { 'dir': dir, 'uri': uri }