From a28be877f35da4e881ec76c9fb821cc232fd854f Mon Sep 17 00:00:00 2001 From: Alexander Jeurissen Date: Wed, 8 Feb 2017 21:48:39 +0100 Subject: [PATCH 1/2] Introduce new command PlugOpen to browse the plug directory of a plugin. --- plug.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plug.vim b/plug.vim index f7564ea..aa2716d 100644 --- a/plug.vim +++ b/plug.vim @@ -138,6 +138,7 @@ function! s:define_commands() endif command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugOpen call s:open('',) command! -nargs=0 -bar -bang PlugClean call s:clean(0) command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif command! -nargs=0 -bar PlugStatus call s:status() @@ -592,6 +593,10 @@ function! s:update(force, names) call s:update_impl(1, a:force, a:names) endfunction +function! s:open(force, name) + exec ':Sexplore'.a:force.' '.g:plug_home.'/'.a:name.'/' +endfunction + function! plug#helptags() if !exists('g:plugs') return s:err('plug#begin was not called') From b2237a6a0c085c02fa391ec4238849cef43f1979 Mon Sep 17 00:00:00 2001 From: Alexander Jeurissen Date: Wed, 8 Feb 2017 22:01:31 +0100 Subject: [PATCH 2/2] Fix bug in bang behaviour. --- plug.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index aa2716d..d7a4057 100644 --- a/plug.vim +++ b/plug.vim @@ -594,7 +594,12 @@ function! s:update(force, names) endfunction function! s:open(force, name) - exec ':Sexplore'.a:force.' '.g:plug_home.'/'.a:name.'/' + let plugpath = g:plug_home.'/'.a:name.'/' + if a:force + exec ':Sexplore! '. plugpath + else + exec ':Sexplore '. plugpath + endif endfunction function! plug#helptags()