From 15245aa4985e470a9dbbeeaefcfb5adea52af5b6 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 28 Sep 2022 11:39:23 -0700 Subject: [PATCH] Use nvim as git diff tool if available --- recipes/default/git | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/default/git b/recipes/default/git index e730ae9..32265a0 100755 --- a/recipes/default/git +++ b/recipes/default/git @@ -1,11 +1,14 @@ #! /bin/bash # Set vim as default git editor -git config --global core.editor vim # Turn on colors git config --global color.ui auto # Set diff tool to vimdiff -git config --global diff.tool vimdiff +if type nvim &>/dev/null ; then + git config --global diff.tool nvim -d +else + git config --global diff.tool vimdiff +fi # Suppress launching prompt git config --global difftool.prompt false # Make main my default branch