From 26bcca97ba94501de73d5fc6f1ca4c4e40204912 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 24 Jan 2024 22:48:11 +0200 Subject: [PATCH] Remove git mergetool and difftool, use zsh diffview alias instead This is because as a git tool, it wants to open each file separately. Neovim and diffview plugin provide a handy UI to manage multiple files in diff and merge --- home/.config/git/config | 9 --------- home/.config/zsh/04-aliases.zsh | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/home/.config/git/config b/home/.config/git/config index d3b78fbf..3f4d7fe3 100644 --- a/home/.config/git/config +++ b/home/.config/git/config @@ -30,15 +30,6 @@ prompt = false [mergetool "nvim"] cmd = nvim +DiffviewOpen -[diff] -tool = nvim - -[difftool] -prompt = false - -[difftool "nvim"] -cmd = nvim +DiffviewOpen - [pull] rebase = merges diff --git a/home/.config/zsh/04-aliases.zsh b/home/.config/zsh/04-aliases.zsh index d9ea72e3..c93efc6a 100644 --- a/home/.config/zsh/04-aliases.zsh +++ b/home/.config/zsh/04-aliases.zsh @@ -10,6 +10,11 @@ alias gs='git status' alias gpull='git pull' alias gpush='git push' +# Open nvim with diffview +# Handy plugin for viewing git diffs +# and handling merges +alias diffview='nvim +DiffviewOpen' + # Rename grc alias from forgit since it # collides with the grc colorizer forgit_revert_commit=fgrc