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