mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-24 21:16:51 -07:00
Windows support
This commit is contained in:
parent
0c1a96b6b2
commit
055c4877d2
11
plug.vim
11
plug.vim
@ -119,7 +119,7 @@ function! s:apply()
|
|||||||
endfor
|
endfor
|
||||||
runtime! plugin/*.vim
|
runtime! plugin/*.vim
|
||||||
runtime! after/*.vim
|
runtime! after/*.vim
|
||||||
source $MYVIMRC
|
silent! source $MYVIMRC
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:syntax()
|
function! s:syntax()
|
||||||
@ -288,8 +288,13 @@ function! s:update_parallel(pull, threads)
|
|||||||
EOF
|
EOF
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:path(path)
|
||||||
|
return substitute(s:is_win ? substitute(a:path, '/', '\', 'g') : a:path,
|
||||||
|
\ '[/\\]*$', '', '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:glob_dir(path)
|
function! s:glob_dir(path)
|
||||||
return filter(split(globpath(a:path, '**'), '\n'), 'isdirectory(v:val)')
|
return map(filter(split(globpath(a:path, '**'), '\n'), 'isdirectory(v:val)'), 's:path(v:val)')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:clean()
|
function! s:clean()
|
||||||
@ -297,7 +302,7 @@ function! s:clean()
|
|||||||
call append(0, 'Removing unused plugins in '.g:plug_home)
|
call append(0, 'Removing unused plugins in '.g:plug_home)
|
||||||
|
|
||||||
" List of files
|
" List of files
|
||||||
let dirs = map(values(g:plug), 'substitute(v:val.dir, "/*$", "", "")')
|
let dirs = map(values(g:plug), 's:path(v:val.dir)')
|
||||||
let alldirs = dirs +
|
let alldirs = dirs +
|
||||||
\ map(copy(dirs), 'fnamemodify(v:val, ":h")') +
|
\ map(copy(dirs), 'fnamemodify(v:val, ":h")') +
|
||||||
\ map(copy(dirs), 'fnamemodify(v:val, ":h:h")')
|
\ map(copy(dirs), 'fnamemodify(v:val, ":h:h")')
|
||||||
|
Loading…
Reference in New Issue
Block a user