motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 201bdd0eff4cd79847cf006f143deb62f8f97342 (tree)
parent c212714cba92331f45c2c7d7a08ab1c12c873ee1
Author: Tim Pope <code@tpope.net>
Date:   Mon, 12 Sep 2011 17:02:07 -0400

Fix completion of :Gedit!

Diffstat:
Mplugin/fugitive.vim | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -1019,6 +1019,10 @@ function! s:Edit(cmd,bang,...) abort endfunction function! s:EditComplete(A,L,P) abort + return s:repo().superglob(a:A) +endfunction + +function! s:EditRunComplete(A,L,P) abort if a:L =~# '^\w\+!' return s:GitComplete(a:A,a:L,a:P) else @@ -1028,11 +1032,11 @@ endfunction call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Ge :execute s:Edit('edit<bang>',0,<f-args>)") call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gedit :execute s:Edit('edit<bang>',0,<f-args>)") -call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gpedit :execute s:Edit('pedit',<bang>0,<f-args>)") -call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gsplit :execute s:Edit('split',<bang>0,<f-args>)") -call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gvsplit :execute s:Edit('vsplit',<bang>0,<f-args>)") -call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gtabedit :execute s:Edit('tabedit',<bang>0,<f-args>)") -call s:command("-bar -bang -nargs=? -count -complete=customlist,s:EditComplete Gread :execute s:Edit((!<count> && <line1> ? '' : <count>).'read',<bang>0,<f-args>)") +call s:command("-bar -bang -nargs=? -complete=customlist,s:EditRunComplete Gpedit :execute s:Edit('pedit',<bang>0,<f-args>)") +call s:command("-bar -bang -nargs=? -complete=customlist,s:EditRunComplete Gsplit :execute s:Edit('split',<bang>0,<f-args>)") +call s:command("-bar -bang -nargs=? -complete=customlist,s:EditRunComplete Gvsplit :execute s:Edit('vsplit',<bang>0,<f-args>)") +call s:command("-bar -bang -nargs=? -complete=customlist,s:EditRunComplete Gtabedit :execute s:Edit('tabedit',<bang>0,<f-args>)") +call s:command("-bar -bang -nargs=? -count -complete=customlist,s:EditRunComplete Gread :execute s:Edit((!<count> && <line1> ? '' : <count>).'read',<bang>0,<f-args>)") " }}}1 " Gwrite, Gwq {{{1