From b7287bd5421da62986d9abf9131509b2c9f918e4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 26 Apr 2022 16:21:33 -0400 Subject: [PATCH] Provide explicit explanation of command naming --- doc/fugitive.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 91dd09c..41fd829 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -98,6 +98,12 @@ that are part of Git repositories). *:Git_mergetool* :Git mergetool [args] Like |:Git_difftool|, but target merge conflicts. +Wrappers for Vim built-ins ~ + +These all directly map onto a built-in Vim command, and generally have names +that prepend "G" to the command they are wrapping. For example, :Ggrep is G +plus |:grep|. + *:Ggrep* *:Git_grep* :Ggrep[!] [args] An approximation of |:grep|[!] with git-grep as :Git[!] grep -O [args] 'grepprg'. @@ -113,11 +119,12 @@ that are part of Git repositories). *:Gclog* :Gclog[!] [args] Use git-log [args] to load the commit history into the |quickfix| list. Jumps to the first commit unless [!] - is given. + is given. This command wraps |:cfile|. The quickfix list can be awkward for many use cases and exhibits extremely poor performance with larger - data sets. Consider using |:Git| log instead. + data sets. Consider using |:Git| log --oneline + instead. :{range}Gclog[!] [args] Use git-log -L to load previous revisions of the given range of the current file into the |quickfix| list. @@ -213,6 +220,13 @@ that are part of Git repositories). 'diffopt'. The split will still be vertical if combined with |:vertical|. +Other commands ~ + +These do not directly correspond to any built-in Vim command, and have a +capital letter after the "G" to convey this. For example, the file move +operation has nothing to do with the |:move| built-in, so it is named :GMove, +not :Gmove. + *:GMove* :GMove {destination} Wrapper around git-mv that renames the buffer afterward. Add a ! to pass -f.