From f05e5bcd5d69ff1583cf0d6f3a2a5f1945f612e2 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Tue, 18 May 2021 11:33:32 +0530 Subject: [PATCH] nvim: after/plugin: fugitive: Add a key mapping for Gedit Gedit is helpful to open up previous versions of the file. For example, :Gedit HEAD~3:% loads the current file as it existed 3 commits ago. --- nvim/.config/nvim/after/plugin/fugitive.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/.config/nvim/after/plugin/fugitive.vim b/nvim/.config/nvim/after/plugin/fugitive.vim index 36ebf8f..ce2f807 100644 --- a/nvim/.config/nvim/after/plugin/fugitive.vim +++ b/nvim/.config/nvim/after/plugin/fugitive.vim @@ -6,6 +6,8 @@ nnoremap gc :Git checkout -b nnoremap gC :Git checkout nnoremap gd :Ghdiffsplit! nnoremap gD :Gvdiffsplit! +nnoremap ge :sp:Gedit HEAD~:% +nnoremap gE :sp:Gedit nnoremap gl :Git log --stat % nnoremap gL :Git log --stat -n 100 xnoremap gl :call git#git_log_range()