Created
February 25, 2015 09:11
-
-
Save gobenji/b18737dec1c5960c3c75 to your computer and use it in GitHub Desktop.
vim command to launch `git gui blame` on the current file and position
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
function LaunchGGBlame() | |
let cmd = printf("git gui blame --line=%d %s &", line("."), shellescape(bufname(""))) | |
let output = system(cmd) | |
if v:shell_error != 0 | |
let msg = printf("Error running '%s': %s", cmd, output) | |
echohl WarningMsg | echon msg | echohl None | |
return | |
endif | |
endfunction | |
command GGBlame call LaunchGGBlame() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment