Revert "Make :Plug command unavailable after end()"
This reverts commit d369322e03
.
This commit is contained in:
parent
d369322e03
commit
4b13f358a0
1 changed files with 6 additions and 18 deletions
24
plug.vim
24
plug.vim
|
@ -76,21 +76,17 @@ function! plug#begin(...)
|
||||||
let g:plug_home = home
|
let g:plug_home = home
|
||||||
let g:plugs = {}
|
let g:plugs = {}
|
||||||
|
|
||||||
silent! delcommand PlugInstall
|
command! -nargs=+ Plug call s:add(1, <args>)
|
||||||
silent! delcommand PlugUpdate
|
command! -nargs=* PlugInstall call s:install(<f-args>)
|
||||||
silent! delcommand PlugClean
|
command! -nargs=* PlugUpdate call s:update(<f-args>)
|
||||||
silent! delcommand PlugUpgrade
|
command! -nargs=0 -bang PlugClean call s:clean('<bang>' == '!')
|
||||||
silent! delcommand PlugStatus
|
command! -nargs=0 PlugUpgrade if s:upgrade() | execute "source ". s:me | endif
|
||||||
command! -nargs=+ Plug call s:add(1, <args>)
|
command! -nargs=0 PlugStatus call s:status()
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! plug#end()
|
function! plug#end()
|
||||||
if !exists(':Plug')
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
let keys = keys(g:plugs)
|
let keys = keys(g:plugs)
|
||||||
while !empty(keys)
|
while !empty(keys)
|
||||||
let keys = keys(s:extend(keys))
|
let keys = keys(s:extend(keys))
|
||||||
|
@ -105,14 +101,6 @@ function! plug#end()
|
||||||
execute "set rtp+=".rtp.'after'
|
execute "set rtp+=".rtp.'after'
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
delcommand Plug
|
|
||||||
command! -nargs=* PlugInstall call s:install(<f-args>)
|
|
||||||
command! -nargs=* PlugUpdate call s:update(<f-args>)
|
|
||||||
command! -nargs=0 -bang PlugClean call s:clean('<bang>' == '!')
|
|
||||||
command! -nargs=0 PlugUpgrade if s:upgrade() | execute "source ". s:me | endif
|
|
||||||
command! -nargs=0 PlugStatus call s:status()
|
|
||||||
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
syntax on
|
syntax on
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in a new issue