Use nvim as git diff tool if available

This commit is contained in:
ViViDboarder 2022-09-28 11:39:23 -07:00
parent b10cbb5247
commit 15245aa498

View File

@ -1,11 +1,14 @@
#! /bin/bash #! /bin/bash
# Set vim as default git editor # Set vim as default git editor
git config --global core.editor vim
# Turn on colors # Turn on colors
git config --global color.ui auto git config --global color.ui auto
# Set diff tool to vimdiff # 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 # Suppress launching prompt
git config --global difftool.prompt false git config --global difftool.prompt false
# Make main my default branch # Make main my default branch