From 15b19020b4f5380e870d10c91ad4d83d6f81c734 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 20 Nov 2020 10:00:41 +0000 Subject: [PATCH] Document how to open quickfix list after :GitGutterQuickFix See #676, #749. --- README.mkd | 6 +++++- doc/gitgutter.txt | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.mkd b/README.mkd index c8dc9aa..7b93b01 100644 --- a/README.mkd +++ b/README.mkd @@ -168,7 +168,11 @@ When you jump between hunks, a message like `Hunk 4 of 11` is shown on the comma let g:gitgutter_show_msg_on_hunk_jumping = 0 ``` -You can load all your hunks into the quickfix list with `:GitGutterQuickFix`. Note this ignores any unsaved changes in your buffers. If the option `g:gitgutter_use_location_list` is set, this command will load hunks into the current window's location list instead. +You can load all your hunks into the quickfix list with `:GitGutterQuickFix`. Note this ignores any unsaved changes in your buffers. If the option `g:gitgutter_use_location_list` is set, this command will load hunks into the current window's location list instead. Use `:copen` (or `:lopen`) to open the quickfix / location list or add a map like this: + +```viml +nmap gq :GitGutterQuickFix\|copen +``` You can stage or undo an individual hunk when your cursor is in it: diff --git a/doc/gitgutter.txt b/doc/gitgutter.txt index 72da3df..e8e507c 100644 --- a/doc/gitgutter.txt +++ b/doc/gitgutter.txt @@ -146,7 +146,13 @@ Commands for jumping between hunks:~ :GitGutterQuickFix Load all hunks into the |quickfix| list. Note this ignores any unsaved changes in your buffers. The |g:gitgutter_use_location_list| option can be set to - populate the location list of the current window instead + populate the location list of the current window + instead. Use |:copen| (or |:lopen|) to open a buffer + containing the search results in linked form; or add a + map like this: +> + nmap gq :GitGutterQuickFix\|copen +< Commands for operating on a hunk:~