From 9247ec3937da0138e515ad349a8cd8767e607e09 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 14 Oct 2021 16:27:11 +0100 Subject: [PATCH] Added git diff pager --- .gitconfig | 10 +++++++++- Makefile | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 1925ac9..95bf327 100644 --- a/.gitconfig +++ b/.gitconfig @@ -8,8 +8,16 @@ [core] editor = /usr/bin/vim excludesfile = ~/.gitignore - pager = git-split-diffs --color | less -RFX +[pager] + diff = delta + log = delta + reflog = delta + show = delta + +[delta] + line-numbers = true + side-by-side = true [push] default = simple diff --git a/Makefile b/Makefile index 957f30e..4eb6a02 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ pre-reqs: ## Install all required binaries. which btm > /dev/null || cargo install bottom; \ which procs > /dev/null || brew install procs; \ which dog > /dev/null || brew install dog; \ + which delta > /dev/null || brew install git-delta; \ which switcher > /dev/null || brew install danielfoehrkn/switch/switch; \ brew install gpg gawk coreutils; \ git clone https://github.com/zsh-users/zsh-autosuggestions $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions; \ @@ -73,6 +74,7 @@ upgrade: ## Upgrade all required binaries. which btm > /dev/null && cargo install bottom; \ which procs > /dev/null && brew upgrade procs; \ which dog > /dev/null && brew upgrade dog; \ + which delta > /dev/null && brew upgrade git-delta; \ which switcher > /dev/null && brew upgrade switch; \ cd $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && git pull && cd -; \ cd $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && git pull && cd -; \