Skip to content

Commit

Permalink
Provide explicit explanation of command naming
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Apr 26, 2022
1 parent b5bbd0d commit b7287bd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions doc/fugitive.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b7287bd

Please sign in to comment.