From bd0b87d36ad80e8acd94f22028d15ebb441b1c28 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 1 Mar 2019 16:36:41 -0500 Subject: [PATCH] Provide gq to close status buffer References https://github.com/tpope/vim-fugitive/issues/1221 --- autoload/fugitive.vim | 1 + doc/fugitive.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 4a57cedcf0..8e68428ce5 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1580,6 +1580,7 @@ function! fugitive#BufReadStatus() abort nnoremap P :execute StagePatch(line('.'),line('.')+v:count1-1) xnoremap P :execute StagePatch(line("'<"),line("'>")) nnoremap q :if bufnr('$') == 1quitelsebdeleteendif + nnoremap gq :if bufnr('$') == 1quitelsebdeleteendif nnoremap R :exe ReloadStatus() nnoremap U :echoerr 'Changed to X' nnoremap g :execute StageDelete(line('.'),v:count) diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 3ccdd1e051..16f20f15b4 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -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.