Skip to content

Commit b7287bd

Browse files
committed
Provide explicit explanation of command naming
1 parent b5bbd0d commit b7287bd

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

doc/fugitive.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ that are part of Git repositories).
9898
*:Git_mergetool*
9999
:Git mergetool [args] Like |:Git_difftool|, but target merge conflicts.
100100

101+
Wrappers for Vim built-ins ~
102+
103+
These all directly map onto a built-in Vim command, and generally have names
104+
that prepend "G" to the command they are wrapping. For example, :Ggrep is G
105+
plus |:grep|.
106+
101107
*:Ggrep* *:Git_grep*
102108
:Ggrep[!] [args] An approximation of |:grep|[!] with git-grep as
103109
:Git[!] grep -O [args] 'grepprg'.
@@ -113,11 +119,12 @@ that are part of Git repositories).
113119
*:Gclog*
114120
:Gclog[!] [args] Use git-log [args] to load the commit history into the
115121
|quickfix| list. Jumps to the first commit unless [!]
116-
is given.
122+
is given. This command wraps |:cfile|.
117123

118124
The quickfix list can be awkward for many use cases
119125
and exhibits extremely poor performance with larger
120-
data sets. Consider using |:Git| log instead.
126+
data sets. Consider using |:Git| log --oneline
127+
instead.
121128

122129
:{range}Gclog[!] [args] Use git-log -L to load previous revisions of the given
123130
range of the current file into the |quickfix| list.
@@ -213,6 +220,13 @@ that are part of Git repositories).
213220
'diffopt'. The split will still be vertical if
214221
combined with |:vertical|.
215222

223+
Other commands ~
224+
225+
These do not directly correspond to any built-in Vim command, and have a
226+
capital letter after the "G" to convey this. For example, the file move
227+
operation has nothing to do with the |:move| built-in, so it is named :GMove,
228+
not :Gmove.
229+
216230
*:GMove*
217231
:GMove {destination} Wrapper around git-mv that renames the buffer
218232
afterward. Add a ! to pass -f.

0 commit comments

Comments
 (0)