aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-07-23 00:56:21 -0400
committerTeddy Wing2015-07-23 00:56:21 -0400
commitd13db2d5906ab17036837adef94e5df2b559febd (patch)
treef8bc232423eb59dc8afddd81c3a4cdb1b4af9529
parenta43d3caaea3682f58aee6dc295e48cca415067c5 (diff)
downloaddotvim-d13db2d5906ab17036837adef94e5df2b559febd.tar.bz2
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.
-rw-r--r--vimrc3
1 files changed, 2 insertions, 1 deletions
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 <leader>p :read !pbpaste<cr>
" 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 <leader>gb :vnew \| read !git blame <c-r>=expand('%:p')<cr><cr> \| redraw!<cr>
+nnoremap <leader>gb :!git blame <c-r>=expand('%:p')<cr> \| less -S<cr>