Skip to content

Instantly share code, notes, and snippets.

@gobenji
Created February 25, 2015 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gobenji/b18737dec1c5960c3c75 to your computer and use it in GitHub Desktop.
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
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