mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-22 00:36:31 +00:00
Use nvim as git diff tool if available
This commit is contained in:
parent
b10cbb5247
commit
15245aa498
@ -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
|
||||||
|
if type nvim &>/dev/null ; then
|
||||||
|
git config --global diff.tool nvim -d
|
||||||
|
else
|
||||||
git config --global diff.tool vimdiff
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user