From 1cc8ee9777bbb5221271516351fde770e52350d1 Mon Sep 17 00:00:00 2001 From: typebrook Date: Tue, 26 Mar 2019 20:53:07 +0800 Subject: update --- tigrc | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tigrc') diff --git a/tigrc b/tigrc index f44a8c3..86dc6ed 100644 --- a/tigrc +++ b/tigrc @@ -8,13 +8,16 @@ bind generic 9 !@sh -c "echo -n %(commit) | head -c7 | xclip -selection c" bind generic g none bind generic gg move-first-line bind generic G move-last-line -bind generic gr view-grep +bind generic E view-grep bind generic w :toggle ignore-case set ignore-case = true set line-graphics = utf-8 set refresh-mode = after-command +bind generic L >sh -c "git reflog --pretty=raw | tig --pretty=raw" +bind generic _ ?git reset --hard HEAD@{"%(prompt Enter HEAD@{} number: )"} + # main view set main-view = \ date:default \ @@ -84,6 +87,12 @@ bind stash n @sh -c "git stash drop %(stash) | \ tr -d '()' | \ xargs git stash store -m '%(prompt Enter stash name: )'" +# stage view +bind stage n :/^@@ +bind stage p :?^@@ +bind stage n :/^diff --(git|cc) +bind stage p :?^diff --(git|cc) + # tree view bind tree d ?rm %(file) bind tree 3 !@sh -c "echo -n %(file) | xclip -selection c" @@ -95,6 +104,16 @@ bind refs c @git checkout %(branch) bind refs bd ?git branch -d %(branch) bind refs bD ?git branch -D %(branch) +# log view +bind log n :/^commit +bind log p :?^commit + +# diff view +bind diff n :/^@@ +bind diff p :?^@@ +bind diff n :/^diff --(git|cc) +bind diff p :?^diff --(git|cc) + # color color diff-header black yellow color diff-chunk white magenta -- cgit v1.2.3-70-g09d2