mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-10 02:41:50 +08:00
Define a separate version of s:is_local_plug for Windows
This commit is contained in:
12
plug.vim
12
plug.vim
@@ -212,6 +212,10 @@ if s:is_win
|
|||||||
function! s:dirpath(path)
|
function! s:dirpath(path)
|
||||||
return s:path(a:path) . '\'
|
return s:path(a:path) . '\'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:is_local_plug(repo)
|
||||||
|
return a:repo =~? '^[a-z]:'
|
||||||
|
endfunction
|
||||||
else
|
else
|
||||||
function! s:rtp(spec)
|
function! s:rtp(spec)
|
||||||
return s:dirpath(a:spec.dir . get(a:spec, 'rtp', ''))
|
return s:dirpath(a:spec.dir . get(a:spec, 'rtp', ''))
|
||||||
@@ -224,6 +228,10 @@ else
|
|||||||
function! s:dirpath(path)
|
function! s:dirpath(path)
|
||||||
return s:trim(a:path) . '/'
|
return s:trim(a:path) . '/'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:is_local_plug(repo)
|
||||||
|
return a:repo[0] =~ '[/$~]'
|
||||||
|
endfunction
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! s:err(msg)
|
function! s:err(msg)
|
||||||
@@ -363,10 +371,6 @@ function! s:extract_name(repo)
|
|||||||
return substitute(fnamemodify(a:repo, ':t'), '\.git$', '', '')
|
return substitute(fnamemodify(a:repo, ':t'), '\.git$', '', '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:is_local_plug(repo)
|
|
||||||
return a:repo[0] =~ '[/$~]' || a:repo =~? '^[a-z]:'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:install(...)
|
function! s:install(...)
|
||||||
call s:update_impl(0, a:000)
|
call s:update_impl(0, a:000)
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user