sponsor Vim development Vim logo Vim Book Ad

git:file.vim : open any version of a file in git

 script karma  Rating 227/59, Downloaded by 2337  Comments, bugs, improvements  Vim wiki

created by
Bart Trojanowski
 
script type
utility
 
description
Allows for opening <branch>:<file> patters using a git repo.

You can open a file from the shell:

    vim HEAD~10:filename

or from inside vim:

    :e branch:filename
    :sp tag:filename

you could even check what changed between the current edits and another revision:

    :diffthis
    :vsp HEAD:%
    :diffthis

but that's what gitdiff.vim (vimscript#1846) is for.
 
install details
copy to ~/.vim/plugins/git:file.vim
 

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
git:file.vim 0.1 2008-03-07 7.0 Bart Trojanowski Initial upload
ip used for rating: 216.73.216.107

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github