diff options
author | Teddy Wing | 2015-07-23 03:03:19 -0400 |
---|---|---|
committer | Teddy Wing | 2015-07-23 03:03:19 -0400 |
commit | 2157680c7fd1aebd4aeae2ba102c30ec0349a574 (patch) | |
tree | 9fa4a9dcb77750a943183b4ce21ae164af9564aa /vimrc | |
parent | d13db2d5906ab17036837adef94e5df2b559febd (diff) | |
download | dotvim-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-- | vimrc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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> |