sponsor Vim development Vim logo Vim Book Ad

git-time-lapse : Perforce-style

 script karma  Rating 47/25, Downloaded by 1996  Comments, bugs, improvements  Vim wiki

created by
Ben Cotterell
 
script type
utility
 
description
You're editing a file which is in a git repository. Press a key which opens a new tab which shows how that commit changed that file in vim's diff mode (:help diff), with a window at the bottom showing the commit message. Left and right arrows move through the history. Shift-left and shift-right go all the way to the end. Return on a line goes back to the last commit that touched that line (using git blame).

Close the tab when you're bored with it and carry on vimming as usual. You can open as many time-lapse tabs on different files in one vim session as you want.

Inspired by the "time lapse view" in the Perforce gui which I thought was quite good, although I prefer the vim version.
 
install details
Drop time-lapse.vim into .vim/plugin and map a key in your .vimrc, e.g.

map <leader>gt :call TimeLapse() <cr>

Or however you prefer.

You can also get the script with:

$ git clone http://www.tidraso.co.uk/repository/vim-plugin/

Where you may find new features.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
time-lapse.vim 1.5 2014-11-21 7.0 Ben Cotterell Move to top if the original starting point no longer exists in the revision currently being viewed.
time-lapse.vim 1.4 2014-11-20 7.0 Ben Cotterell Restore cursor position while moving through revisions, so you can look at changes to the part of the file you're interested in. Thanks to Caroline Kikisch for pointing out the problem.
time-lapse.vim 1.3 2013-04-10 7.0 Ben Cotterell Restore cursor after opening time-lapse tab, so you can immediately do a Blame from there (common use case). So ,gt <Enter> does a quick blame.
time-lapse.vim 1.2 2013-03-20 7.0 Ben Cotterell Incorporate bug fixes from chronial, including improved Win32 support.
time-lapse.vim 1.1 2013-02-13 7.0 Ben Cotterell Bug fix for Blame operation across renames.
time-lapse.vim 1.0 2011-12-17 7.0 Ben Cotterell Initial upload
ip used for rating: 18.189.2.122

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github