diff --git a/.vimrc b/.vimrc index c6ab2ed..ed0c664 100644 --- a/.vimrc +++ b/.vimrc @@ -32,6 +32,8 @@ Plugin 'bling/vim-airline' Plugin 'bling/vim-bufferline' " Version control notes in the line number bar Plugin 'mhinz/vim-signify' +" Git wrapper +Plugin 'tpope/vim-fugitive' " Think of sensible.vim as one step above 'nocompatible' mode: a universal " set of defaults that (hopefully) everyone can agree on. Plugin 'tpope/vim-sensible' @@ -261,7 +263,8 @@ nnoremap l :ls:b " Git and Mercurial 'blame' command. First select lines in visual modes, then " hit the appropriate leader key sequence (e.g., \g for git blame) -vmap g :!git blame =expand("%:p") \| sed -n =line("'<") ,=line("'>") p +" Update: For Git blame, just do :Gblame from vim-fugitive +"vmap g :!git blame =expand("%:p") \| sed -n =line("'<") ,=line("'>") p vmap h :!hg blame -fu =expand("%:p") \| sed -n =line("'<") ,=line("'>") p