From d13db2d5906ab17036837adef94e5df2b559febd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 23 Jul 2015 00:56:21 -0400 Subject: vimrc: Open `git blame` in less instead of in new split Easier and more quick-and-dirty. Doesn't create a new buffer. I'll probably switch back to the Vim split version, but I'd like to get it to open on the current line before I do. --- vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index c375449..e369db2 100644 --- a/vimrc +++ b/vimrc @@ -323,6 +323,7 @@ " " 2015.07.23: " * Add mapping to open a new split that `git blame`s the current file +" * Modify `git blame` mapping to open in less " @@ -656,7 +657,7 @@ nnoremap p :read !pbpaste " Open a new split with a `git blame` of the current file " Inspired by Ben Orenstein " https://github.com/r00k/dotfiles/blob/7874508b825fd754e4ec3259da65f324ab96c8ea/vimrc#L74 -nnoremap gb :vnew \| read !git blame =expand('%:p') \| redraw! +nnoremap gb :!git blame =expand('%:p') \| less -S -- cgit v1.2.3