commit 9fadd7a7780f38d1b8666d5b5f497fbcd46952eb (tree)
parent acee96738408aafc1d9dfaa4e36f8bba62b0c707
Author: Tim Pope <code@tpope.net>
Date: Sun, 12 Jun 2022 16:08:26 -0400
Provide :Gdrop
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/doc/fugitive.txt b/doc/fugitive.txt
@@ -157,6 +157,9 @@ plus |:grep|.
*:Gpedit*
:Gpedit [object] |:pedit| a |fugitive-object|.
+ *:Gdrop*
+:Gdrop [object] |:drop| a |fugitive-object|.
+
*:Gread* *fugitive-:Gr*
:Gread [object] Empty the buffer and |:read| a |fugitive-object|.
When the argument is omitted, this is similar to
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -582,6 +582,7 @@ exe 'command! -bar -bang -nargs=* -complete=customlist,
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_other '-complete=customlist,fugitive#EditComplete Gsplit exe fugitive#Open((<count> > 0 ? <count> : "").(<count> ? "split" : "edit"), <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_other '-complete=customlist,fugitive#EditComplete Gvsplit exe fugitive#Open((<count> > 0 ? <count> : "").(<count> ? "vsplit" : "edit!"), <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_tabs '-complete=customlist,fugitive#EditComplete Gtabedit exe fugitive#Open((<count> >= 0 ? <count> : "")."tabedit", <bang>0, "<mods>", <q-args>)'
+exe 'command! -bar -bang -nargs=* -complete=customlist,fugitive#EditComplete Gdrop exe fugitive#Open("drop", <bang>0, "<mods>", <q-args>)'
if exists(':Gr') != 2
exe 'command! -bar -bang -nargs=* -range=-1 -complete=customlist,fugitive#ReadComplete Gr exe fugitive#ReadCommand(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'