From 6dd369b137f8623f0d5a28b9dbace427ca7132d2 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sat, 12 Feb 2022 10:16:41 +0530 Subject: [PATCH] nvim: autoload/git: Use diff instead of difftool --- nvim/.config/nvim/autoload/git.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/autoload/git.vim b/nvim/.config/nvim/autoload/git.vim index 1fd64dc..555e22c 100644 --- a/nvim/.config/nvim/autoload/git.vim +++ b/nvim/.config/nvim/autoload/git.vim @@ -109,13 +109,13 @@ function! git#git_cherry_pick_range() abort silent execute "bw" endfunction -" Run Git difftool on the commit in the line which we are at. To be used after +" Run Git diff on the commit in the line which we are at. To be used after " running some variation of Git log. function! git#git_diff_commit() abort " A line in Git log is of the form commit let line = trim(getline('.')) let commit = split(line, " ") - execute "Git difftool -y " . commit[1] . " " . commit[1] . "~1" + execute "Gtabedit | Git diff " . commit[1] . " " . commit[1] . "~1 | only" endfunction " To be used after running some variation of Git log. @@ -162,7 +162,7 @@ function! git#git_log_named_block() abort endfunction " Compares current branch against master. For eg. git log master..current. -" This combined with Git difftool -y are helpful for MR reviews. +" This combined with Git diff are helpful for MR reviews. function! git#git_log_compare() abort let default = split(trim(system('git symbolic-ref refs/remotes/origin/HEAD')), '/') let current = trim(system('git branch --show-current'))