Created
August 5, 2014 02:59
-
-
Save stantonk/9f4f103e473fa00567c4 to your computer and use it in GitHub Desktop.
View git blame, hg blame, svn blame in vim or MacVim. Note, you must first select the source lines with visual mode, then hit the appropriate leader key sequence. Enjoy!
This file contains hidden or 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
" version control blame of selected lines | |
"vmap <Leader>b :<C-U>!svn blame <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR> | |
vmap <Leader>g :<C-U>!git blame <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR> | |
vmap <Leader>h :<C-U>!hg blame -fu <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment