Created
October 8, 2014 13:30
-
-
Save kentokento/e1d2ccf547f607de88a1 to your computer and use it in GitHub Desktop.
vimrc - vim起動中に選択した部分のみのgit blameを表示する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 選択した範囲のgit blameを表示 | |
" 選択した状態で :S (押しやすいから) | |
function! GitBlameOnLineAndFile() range | |
:execute printf(':!git blame -L %d,%d %s | cat', a:firstline, a:lastline, expand("%:p")) | |
endfunction | |
command! -range S :<line1>,<line2>call GitBlameOnLineAndFile() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment