aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-08-12 13:30:38 -0400
committerTeddy Wing2015-08-12 13:30:38 -0400
commitf85d4f551724ed731d692b4d65d91fa49e8c4463 (patch)
tree26b661cdd73ada35c7e7a21baedd5a39eeec429c
parentbabe48b29fc2b6f49d64e06f29014defc0159932 (diff)
downloaddotvim-f85d4f551724ed731d692b4d65d91fa49e8c4463.tar.bz2
vimrc: Add <leader>gp mapping for git log of current file
Open the current file's `git log -p [file]` with a quick mapping so I don't have to switch to another terminal or Ctrl-Z and type in the git command manually. This is something that I do quite often so it felt ripe for a mapping to make it quicker.
-rw-r--r--vimrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index ad81b4b..92cf1e3 100644
--- a/vimrc
+++ b/vimrc
@@ -327,6 +327,9 @@
" * Modify `git blame` mapping to use custom git-blamer plugin
" * Change pick command from `find` to `ag` for speed
"
+" 2015.08.12:
+" * Add <leader>gp mapping to open the git log for the current file
+"
" Pathogen
@@ -657,6 +660,7 @@ cnoremap <Esc>f <S-Right>
nnoremap <leader>p :read !pbpaste<cr>
nnoremap <leader>gb :GitBlamer<cr>
+nnoremap <leader>gp :!git log -p %<cr>