Open
Conversation
GV current shows various Git diffs (unlike vim-fugitive, which
only shows database objects), so it makes sense to export
this functionality, say, for viewing the diff against HEAD
or the index.
For instance:
:call gv#diff("HEAD")
:call gv#diff("--cached", "HEAD")
Contributor
|
Doesn't fugitive already provide this? |
Author
|
Yes, the vimdiff-based Gdiff works with vim-fugitive, however sometimes I just want a quick glance at the unidiff-based format of the diff in a split window, which is what gv good at. |
Contributor
|
Did you try |
Author
|
Yes, however that halts Vim to spawn Git. I think the gv diff buffer in a split window has some benefits over it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GV current shows various Git diffs (unlike vim-fugitive, whichonly shows database objects), so it makes sense to export this functionality, say, for viewing the diff against HEAD or the index.
For instance: