Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git diff in my mvim

Tags:

vim

I was used to doing

git diff | mate

but my new machine does not have mate and I use mvim. So I tried

git diff | mvim

and that did not work. What is the best way to see git diff in mvim editor.

I am using mac and I use mvim.

like image 438
Nick Vanderbilt Avatar asked Aug 04 '10 15:08

Nick Vanderbilt


People also ask

Why is git diff not showing?

There is no output to git diff because Git doesn't see any changes inside your repository, only files outside the repository, which it considers 'untracked' and so ignores when generating a diff.

What does ++ mean in git diff?

When viewing a combined diff, if the two files you're comparing have a line that's different from what they were merged into, you will see the ++ to represent: one line that was added does not appear in either file1 or file2.

How does git calculate diff?

Computing diffsThe diff is dynamically generated from the snapshot data by comparing the root trees of the commit and its parent. Git can compare any two snapshots in time, not just adjacent commits. To compare two commits, start by looking at their root trees, which are almost always different.


2 Answers

I don't know about mvim specifically, but with normal vim you have to give it a filename of - to make it read stdin:

git diff | vim -

Perhaps mvim works the same?

like image 75
speshak Avatar answered Sep 25 '22 07:09

speshak


I do believe you might be seeking this... (obviously, with mvimdiff instead of vimdiff)

like image 28
Amadan Avatar answered Sep 24 '22 07:09

Amadan