1

vim fugitive's Gblame is very good. Gblame annotates the current file and offers keyboard shortcuts like P, which annotates the parent-revision of the file form the blame window.

However, if i want to annotate a specific revision of a file, how do i do that?

I wish there was some thing like

:Gblame <commit-id> 

That would blame the current file as of the given commit-id..

1 Answers1

3

Use :Gedit to view the current file at a certain commit and then run :Gblame

:Gedit <commit-id>:%
:Gblame

We use % to represent the current file's name.

For more help see:

:h fugitive-:Gblame
:h fugitive-:Gedit
:h fugitive-revision
:h cmdline-special
:h :_%
Peter Rincker
  • 43,539
  • 9
  • 74
  • 101