mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Add :GUnlink, like in eunuch.vim
This currently mirrors :GRemove, but gives us the option to add a third variant.
This commit is contained in:
@@ -6629,6 +6629,10 @@ function! fugitive#RemoveCommand(line1, line2, range, bang, mods, arg, ...) abor
|
||||
return s:Remove('edit', a:bang)
|
||||
endfunction
|
||||
|
||||
function! fugitive#UnlinkCommand(line1, line2, range, bang, mods, arg, ...) abort
|
||||
return s:Remove('edit', a:bang)
|
||||
endfunction
|
||||
|
||||
function! fugitive#DeleteCommand(line1, line2, range, bang, mods, arg, ...) abort
|
||||
return s:Remove('bdelete', a:bang)
|
||||
endfunction
|
||||
|
||||
@@ -227,8 +227,9 @@ that are part of Git repositories).
|
||||
passed. Add a ! to pass -f and forcefully discard the
|
||||
buffer.
|
||||
|
||||
*:GRemove*
|
||||
*:GRemove* *:GUnlink*
|
||||
:GRemove Like |:GDelete|, but keep the (now empty) buffer around.
|
||||
:GUnlink
|
||||
|
||||
*:GBrowse*
|
||||
:GBrowse Open the current file, blob, tree, commit, or tag
|
||||
|
||||
@@ -600,6 +600,7 @@ exe 'command! -bar -bang -nargs=* -complete=customlist,fugitive#EditComplete Gwr
|
||||
exe 'command! -bar -bang -nargs=* -complete=customlist,fugitive#EditComplete Gwq exe fugitive#WqCommand( <line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
|
||||
exe 'command! -bar -bang -nargs=0 GRemove exe fugitive#RemoveCommand(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
exe 'command! -bar -bang -nargs=0 GUnlink exe fugitive#UnlinkCommand(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
exe 'command! -bar -bang -nargs=0 GDelete exe fugitive#DeleteCommand(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#CompleteObject GMove exe fugitive#MoveCommand( <line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#RenameComplete GRename exe fugitive#RenameCommand(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'
|
||||
|
||||
Reference in New Issue
Block a user