From b1a6212749ec4470f4c8f57933c6bf678b3215d7 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Tue, 3 Dec 2024 12:29:16 +0530 Subject: [PATCH] nvim: fugitive: Improve git blame Improve git blame by - w: Ignoring white space - C: Detect lines moved or copied in the same commit - C: The commit that created the file - C: Any commit at all --- nvim/.config/nvim/after/plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/after/plugin/fugitive.vim b/nvim/.config/nvim/after/plugin/fugitive.vim index ead892c..dda0cfb 100644 --- a/nvim/.config/nvim/after/plugin/fugitive.vim +++ b/nvim/.config/nvim/after/plugin/fugitive.vim @@ -1,6 +1,6 @@ nnoremap ga :Git add % nnoremap gA :Git reset HEAD % -xnoremap gb :Git blame +xnoremap gb :Git blame -w -C -C -C -M nnoremap gb :keepalt Git branch -a nnoremap gB :keepalt Git branch nnoremap gc :Git checkout -b @@ -20,7 +20,7 @@ nnoremap gl :keepalt Git log --stat % nnoremap gL :keepalt Git log --stat -n 100 xnoremap gl :call git#git_log_range() xnoremap gL :call git#git_log_named_block() -nnoremap gm :0,3Git blamej +nnoremap gm :0,3Git blame -w -C -C -C -Mj nnoremap gM :call git#git_merge_origin() nnoremap gn :Git branch -m nnoremap go :call git#git_log_compare()