From 98bc08b1da020efbeb3397b1c735a8337377eb69 Mon Sep 17 00:00:00 2001 From: typebrook Date: Wed, 27 Feb 2019 18:34:09 +0800 Subject: update tigrc --- gitconfig | 4 ++++ tigrc | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/gitconfig b/gitconfig index edd6c82..2036c46 100644 --- a/gitconfig +++ b/gitconfig @@ -3,3 +3,7 @@ name = typebrook [alias] reorder = "!GIT_SEQUENCE_EDITOR=\"sed -i -n 'h;1n;2p;g;p'\" git rebase -i HEAD~2" +[core] + pager = tig +[color] + ui = off diff --git a/tigrc b/tigrc index 3163698..83a510e 100644 --- a/tigrc +++ b/tigrc @@ -4,16 +4,23 @@ bind generic x :toggle id bind generic 9 !@sh -c "echo -n %(commit) | head -c7 | xclip -selection c" -bind generic g move-first-line -bind generic G move-last-line +bind generic g none +bind generic gg move-first-line +bind generic gr view-grep +bind generic G move-last-line bind generic w :toggle ignore-case +bind main gG :toggle commit-title-graph +bind main G move-last-line bind main c ?git checkout %(commit) bind main T @git tag "%(prompt Enter tag name: )" %(commit) bind main !?git rebase -i %(commit) bind main M ?git merge %(commit) bind main P ?git push bind main b @git checkout -b "%(prompt Enter branch name: )" %(commit) +bind main V @git log -S "%(prompt Enter search word: )" +bind main gd ?git branch -d %(branch) +bind main gD ?git branch -D %(branch) set main-view = \ date:default \ @@ -38,7 +45,9 @@ bind refs c ?git checkout %(branch) set ignore-case = true set line-graphics = utf-8 +set refresh-mode = after-command # set mouse = true -color diff-header default magenta -color diff-chunk black blue +color diff-header black yellow +color diff-chunk white magenta +bind status !sh -c "git difftool -y \"$(git rev-parse --show-toplevel)/%(file)\"" -- cgit v1.2.3-70-g09d2