aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2015-07-23 03:03:19 -0400
committerTeddy Wing2015-07-23 03:03:19 -0400
commit2157680c7fd1aebd4aeae2ba102c30ec0349a574 (patch)
tree9fa4a9dcb77750a943183b4ce21ae164af9564aa /vimrc
parentd13db2d5906ab17036837adef94e5df2b559febd (diff)
downloaddotvim-2157680c7fd1aebd4aeae2ba102c30ec0349a574.tar.bz2
Add git-blamer plugin
Create a plugin that runs a `git blame` and opens the result in a new vertical split. This one builds on a43d3caaea3682f58aee6dc295e48cca415067c5 but improves it by adding some extra niceties including moving to the line the cursor was on in the original file, setting appropriate flags so that the split doesn't appear in the buffer list and becomes non-modifiable, and setting cursor and scroll binding so that the buffers scroll together. An `autocmd` resets the original buffer to `noscrollbind` and `nocursorbind`.
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/vimrc b/vimrc
index e369db2..883a36a 100644
--- a/vimrc
+++ b/vimrc
@@ -324,6 +324,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
+" * Modify `git blame` mapping to use custom git-blamer plugin
"
@@ -657,7 +658,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 :!git blame <c-r>=expand('%:p')<cr> \| less -S<cr>
+nnoremap <leader>gb :GitBlamer<cr>