upgrade vim-plug
This commit is contained in:
@@ -128,7 +128,7 @@ function! plug#begin(...)
|
||||
endfunction
|
||||
|
||||
function! s:define_commands()
|
||||
command! -nargs=+ -bar Plug call s:add(<args>)
|
||||
command! -nargs=+ -bar Plug call s:Plug(<args>)
|
||||
if !executable('git')
|
||||
return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.')
|
||||
endif
|
||||
@@ -248,7 +248,9 @@ function! plug#end()
|
||||
call s:reorg_rtp()
|
||||
filetype plugin indent on
|
||||
if has('vim_starting')
|
||||
if has('syntax') && !exists('g:syntax_on')
|
||||
syntax enable
|
||||
end
|
||||
else
|
||||
call s:reload()
|
||||
endif
|
||||
@@ -411,7 +413,7 @@ function! s:remove_triggers(name)
|
||||
call remove(s:triggers, a:name)
|
||||
endfunction
|
||||
|
||||
function! s:lod(names, types)
|
||||
function! s:lod(names, types, ...)
|
||||
for name in a:names
|
||||
call s:remove_triggers(name)
|
||||
let s:loaded[name] = 1
|
||||
@@ -423,6 +425,9 @@ function! s:lod(names, types)
|
||||
for dir in a:types
|
||||
call s:source(rtp, dir.'/**/*.vim')
|
||||
endfor
|
||||
for file in a:000
|
||||
call s:source(rtp, file)
|
||||
endfor
|
||||
if exists('#User#'.name)
|
||||
execute 'doautocmd User' name
|
||||
endif
|
||||
@@ -430,7 +435,8 @@ function! s:lod(names, types)
|
||||
endfunction
|
||||
|
||||
function! s:lod_ft(pat, names)
|
||||
call s:lod(a:names, ['plugin', 'after/plugin', 'syntax', 'after/syntax'])
|
||||
let syn = 'syntax/'.a:pat.'.vim'
|
||||
call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn)
|
||||
execute 'autocmd! PlugLOD FileType' a:pat
|
||||
if exists('#filetypeplugin#FileType')
|
||||
doautocmd filetypeplugin FileType
|
||||
@@ -458,7 +464,7 @@ function! s:lod_map(map, names, prefix)
|
||||
call feedkeys(a:prefix . substitute(a:map, '^<Plug>', "\<Plug>", '') . extra)
|
||||
endfunction
|
||||
|
||||
function! s:add(repo, ...)
|
||||
function! s:Plug(repo, ...)
|
||||
if a:0 > 1
|
||||
return s:err('Invalid number of arguments (1..2)')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user