Provide explicit explanation of command naming

This commit is contained in:
Tim Pope
2022-04-26 16:21:33 -04:00
parent b5bbd0d181
commit b7287bd542

View File

@@ -98,6 +98,12 @@ that are part of Git repositories).
*:Git_mergetool* *:Git_mergetool*
:Git mergetool [args] Like |:Git_difftool|, but target merge conflicts. :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* *:Git_grep*
:Ggrep[!] [args] An approximation of |:grep|[!] with git-grep as :Ggrep[!] [args] An approximation of |:grep|[!] with git-grep as
:Git[!] grep -O [args] 'grepprg'. :Git[!] grep -O [args] 'grepprg'.
@@ -113,11 +119,12 @@ that are part of Git repositories).
*:Gclog* *:Gclog*
:Gclog[!] [args] Use git-log [args] to load the commit history into the :Gclog[!] [args] Use git-log [args] to load the commit history into the
|quickfix| list. Jumps to the first commit unless [!] |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 The quickfix list can be awkward for many use cases
and exhibits extremely poor performance with larger 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}Gclog[!] [args] Use git-log -L to load previous revisions of the given
range of the current file into the |quickfix| list. 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 'diffopt'. The split will still be vertical if
combined with |:vertical|. 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*
:GMove {destination} Wrapper around git-mv that renames the buffer :GMove {destination} Wrapper around git-mv that renames the buffer
afterward. Add a ! to pass -f. afterward. Add a ! to pass -f.