From 4b13f358a03b5b44c0e1488ea188fbed8458f228 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 7 Oct 2013 02:14:35 +0900 Subject: [PATCH] Revert "Make :Plug command unavailable after end()" This reverts commit d369322e03f805c6f7b64a9c51fb5f0dac8c8bcb. --- plug.vim | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/plug.vim b/plug.vim index 315c125..6acd643 100644 --- a/plug.vim +++ b/plug.vim @@ -76,21 +76,17 @@ function! plug#begin(...) let g:plug_home = home let g:plugs = {} - silent! delcommand PlugInstall - silent! delcommand PlugUpdate - silent! delcommand PlugClean - silent! delcommand PlugUpgrade - silent! delcommand PlugStatus - command! -nargs=+ Plug call s:add(1, ) + command! -nargs=+ Plug call s:add(1, ) + command! -nargs=* PlugInstall call s:install() + command! -nargs=* PlugUpdate call s:update() + command! -nargs=0 -bang PlugClean call s:clean('' == '!') + command! -nargs=0 PlugUpgrade if s:upgrade() | execute "source ". s:me | endif + command! -nargs=0 PlugStatus call s:status() return 1 endfunction function! plug#end() - if !exists(':Plug') - return - endif - let keys = keys(g:plugs) while !empty(keys) let keys = keys(s:extend(keys)) @@ -105,14 +101,6 @@ function! plug#end() execute "set rtp+=".rtp.'after' endif endfor - - delcommand Plug - command! -nargs=* PlugInstall call s:install() - command! -nargs=* PlugUpdate call s:update() - command! -nargs=0 -bang PlugClean call s:clean('' == '!') - command! -nargs=0 PlugUpgrade if s:upgrade() | execute "source ". s:me | endif - command! -nargs=0 PlugStatus call s:status() - filetype plugin indent on syntax on endfunction