Provide gq to close status buffer

References https://github.com/tpope/vim-fugitive/issues/1221
This commit is contained in:
Tim Pope
2019-03-01 16:36:41 -05:00
parent 57b4d848a4
commit bd0b87d36a
2 changed files with 3 additions and 2 deletions

View File

@@ -1580,6 +1580,7 @@ function! fugitive#BufReadStatus() abort
nnoremap <buffer> <silent> P :<C-U>execute <SID>StagePatch(line('.'),line('.')+v:count1-1)<CR>
xnoremap <buffer> <silent> P :<C-U>execute <SID>StagePatch(line("'<"),line("'>"))<CR>
nnoremap <buffer> <silent> q :<C-U>if bufnr('$') == 1<Bar>quit<Bar>else<Bar>bdelete<Bar>endif<CR>
nnoremap <buffer> <silent> gq :<C-U>if bufnr('$') == 1<Bar>quit<Bar>else<Bar>bdelete<Bar>endif<CR>
nnoremap <buffer> <silent> R :<C-U>exe <SID>ReloadStatus()<CR>
nnoremap <buffer> <silent> U :<C-U>echoerr 'Changed to X'<CR>
nnoremap <buffer> <silent> g<Bar> :<C-U>execute <SID>StageDelete(line('.'),v:count)<CR>

View File

@@ -385,8 +385,8 @@ rd Perform an interactive rebase with the commit under
*fugitive-misc-mappings*
Miscellaneous mappings ~
*fugitive_q*
q Close the status buffer.
*fugitive_gq* *fugitive_q*
gq Close the status buffer.
*fugitive_R*
R Reload the status buffer.