Diff of current and previous version using vim-fugitive
I believe it is as simple as:
:vert diffsplit #
This is what I use:
:Gdiff [revision]
See :help Gdiff
for other options as well (vertical vs horizontal splits, etc).
For example:
:Gdiff HEAD
or if you have a revision number (ie: aaffdfdstsdgssetds):
:Gdiff aaffdfds
Could not get fugitive to do what I want (it either doesn't do it or I don't know how to use it), but I did find the plugin which gives the desired behaviour: https://github.com/kablamo/vim-git-log.
(it does not show the diff in quickfix list but in a full sized buffer, which is OK)
First, open the file you want to diff with.
If the change is committed, enter :Gdiff HEAD~1
.
If the change is NOT committed, enter :Gdiff HEAD
.