From a8d309f210a00e786808c8af4bb2debb9cc47abc Mon Sep 17 00:00:00 2001 From: Greg V Date: Mon, 4 May 2015 17:09:05 +0300 Subject: [PATCH] Allow custom repo-to-name modifier Use case: remove the ':t' from the modifier, call plug#begin with '~/src/github.com' and keep the repos in a `go get` / `ghq` style workspace. --- plug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index f61aadd..f07bbbd 100644 --- a/plug.vim +++ b/plug.vim @@ -424,7 +424,7 @@ function! s:add(repo, ...) try let repo = s:trim(a:repo) - let name = fnamemodify(repo, ':t:s?\.git$??') + let name = fnamemodify(repo, get(g:, 'plug_name_modifier', ':t:s?\.git$??')) let spec = extend(s:infer_properties(name, repo), \ a:0 == 1 ? s:parse_options(a:1) : s:base_spec) if !has_key(g:plugs, name)