Last Updated: February 25, 2016
·
355
· wordofchristian

From Vim, see how current file has changed over time.

Often I'll be working on a file in vim and I'll want to see how it's changed recently and who changed it.

Run this command from vim

:!git log --patch %

In vim commands, the % symbol refers to the current file in the active buffer. (%:h refers to the current path)

Running this command will give you a nice diff output for every commit on this file.