mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Retool diffing
Support mods, rename to match the built-in :diffsplit, and (perhaps controversially) move three-way diffing to the bang variant, so that the default behavior always focuses the other window. Closes https://github.com/tpope/vim-fugitive/pull/715
This commit is contained in:
@@ -143,25 +143,28 @@ that are part of Git repositories).
|
||||
:Gwq! [path] Like |:Gwrite|! followed by |:quit|! if the write
|
||||
succeeded.
|
||||
|
||||
*fugitive-:Gdiff*
|
||||
:Gdiff [object] Perform a |vimdiff| against the given file, or if a
|
||||
*fugitive-:Gdiffsplit*
|
||||
:Gdiffsplit [object] Perform a |vimdiff| against the given file, or if a
|
||||
commit is given, the current file in that commit.
|
||||
With no argument, the version in the index is used
|
||||
(which means a three-way diff during a merge conflict,
|
||||
making it a git-mergetool alternative). The newer of
|
||||
the two files is placed to the right or bottom,
|
||||
depending on 'diffopt', and the width of the window
|
||||
relative to 'textwidth'. Use |do| and |dp| and write
|
||||
to the index file to simulate "git add --patch". For
|
||||
the three-way diff, there is also d2o and d3o pulling
|
||||
the hunk to the middle from the left or the right
|
||||
window, respectively.
|
||||
With no argument, the version in the index or work
|
||||
tree is used. The newer of the two files is placed to
|
||||
the right or bottom, depending on 'diffopt' and the
|
||||
width of the window relative to 'textwidth'. Use
|
||||
Vim's |do| and |dp| to stage and unstage changes.
|
||||
|
||||
*fugitive-:Gsdiff*
|
||||
:Gsdiff [object] Like |:Gdiff|, but always split horizontally.
|
||||
*fugitive-:Gdiffsplit!*
|
||||
:Gdiffsplit! [object] During a merge conflict, do a three-way diff against
|
||||
both ancestors. Additional d2o and d3o maps are
|
||||
provided to to obtain the hunk from the "ours" or
|
||||
"theirs" ancestor, respectively. If the file is not
|
||||
conflicted, behaves the same as if no bang was given,
|
||||
but keeps focus in the original window.
|
||||
|
||||
*fugitive-:Gvdiff*
|
||||
:Gvdiff [object] Like |:Gdiff|, but always split vertically.
|
||||
*fugitive-:Gvdiffsplit*
|
||||
:Gvdiffsplit [object] Like |:Gdiffsplit|, but always split vertically.
|
||||
|
||||
*fugitive-:Ghdiffsplit* *fugitive-:Gsdiff*
|
||||
:Ghdiffsplit [object] Like |:Gdiffsplit|, but always split horizontally.
|
||||
|
||||
*fugitive-:Gmove*
|
||||
:Gmove {destination} Wrapper around git-mv that renames the buffer
|
||||
@@ -276,13 +279,14 @@ i On untracked files, call |:Git| add --intent-to-add.
|
||||
automatically.
|
||||
|
||||
*fugitive_dd*
|
||||
dd Perform a |:Gdiff| on the file under the cursor.
|
||||
|
||||
*fugitive_ds*
|
||||
ds Perform a |:Gsdiff| on the file under the cursor.
|
||||
dd Perform a |:Gdiffsplit| on the file under the cursor.
|
||||
|
||||
*fugitive_dv*
|
||||
dv Perform a |:Gvdiff| on the file under the cursor.
|
||||
dv Perform a |:Gvdiffsplit| on the file under the cursor.
|
||||
|
||||
*fugitive_ds* *fugitive_dh*
|
||||
ds Perform a |:Ghdiffsplit| on the file under the cursor.
|
||||
dh
|
||||
|
||||
*fugitive_dp*
|
||||
dp Invoke |:Git!| diff on the file under the cursor.
|
||||
|
||||
Reference in New Issue
Block a user