sponsor Vim development Vim logo Vim Book Ad

git_shade.vim : Colors lines in different intensities according to their age in git's history

 script karma  Rating 7/8, Downloaded by 1117  Comments, bugs, improvements  Vim wiki

created by
joey twiddle
 
script type
utility
 
description
Colours lines in different intensities according to their age in git's history
Also displays commit info for the current line in the cmdline.

Run `:GitShade` to shade the file, and again to turn it off.

Naturally this only works in Vim's GUI mode.
If you never have GUI mode available, you may want to try the
GitGutter plugin instead: https://github.com/airblade/vim-gitgutter

Some possible options (see the plugin file for more):

    let g:GitShade_ColorGradient = "black_to_blue"
    let g:GitShade_ColorWhat = "bg"

    let g:GitShade_ColorGradient = "green_to_white"
    let g:GitShade_ColorWhat = "fg"

In the screenshots below, the brighter blue background indicates a more recent addition.

With `let g:GitShade_Linear = 0` the recent additions stand out clearly:

http://neuralyte.org/~joey/git_shade/git_shade/git_shade_non_linear.png

With `let g:GitShade_Linear = 1` we can see the relative ages of all lines in the file:

http://neuralyte.org/~joey/git_shade/git_shade/git_shade_linear.png
 
install details
Drop the file in ~/.vim/plugin/
 

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_shade.vim 20130627 2013-06-30 6.0 joey twiddle Initial upload
ip used for rating: 44.211.24.175

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