diff options
Diffstat (limited to 'tigrc')
-rw-r--r-- | tigrc | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -2,6 +2,7 @@ | |||
2 | # https://qiita.com/sfus/items/063797a1dd8fdc7d032f | 2 | # https://qiita.com/sfus/items/063797a1dd8fdc7d032f |
3 | # https://github.com/jonas/tig/wiki/Bindings | 3 | # https://github.com/jonas/tig/wiki/Bindings |
4 | 4 | ||
5 | # geineric | ||
5 | bind generic x :toggle id | 6 | bind generic x :toggle id |
6 | bind generic 9 !@sh -c "echo -n %(commit) | head -c7 | xclip -selection c" | 7 | bind generic 9 !@sh -c "echo -n %(commit) | head -c7 | xclip -selection c" |
7 | bind generic g none | 8 | bind generic g none |
@@ -10,6 +11,11 @@ bind generic gr view-grep | |||
10 | bind generic G move-last-line | 11 | bind generic G move-last-line |
11 | bind generic w :toggle ignore-case | 12 | bind generic w :toggle ignore-case |
12 | 13 | ||
14 | set ignore-case = true | ||
15 | set line-graphics = utf-8 | ||
16 | set refresh-mode = after-command | ||
17 | |||
18 | # main view | ||
13 | bind main gG :toggle commit-title-graph | 19 | bind main gG :toggle commit-title-graph |
14 | bind main G move-last-line | 20 | bind main G move-last-line |
15 | bind main c @sh -c "git branch --points-at=%(commit) | \ | 21 | bind main c @sh -c "git branch --points-at=%(commit) | \ |
@@ -36,9 +42,11 @@ set main-view = \ | |||
36 | id \ | 42 | id \ |
37 | commit-title:graph=v2,refs=true | 43 | commit-title:graph=v2,refs=true |
38 | 44 | ||
45 | # blame view | ||
39 | set blame-view-file-name = no | 46 | set blame-view-file-name = no |
40 | set blame-view-line-number = yes,interval=5 | 47 | set blame-view-line-number = yes,interval=5 |
41 | 48 | ||
49 | # status view | ||
42 | bind status s ?git stash | 50 | bind status s ?git stash |
43 | bind status S @git stash save "%(prompt Enter stash name: )" | 51 | bind status S @git stash save "%(prompt Enter stash name: )" |
44 | bind status p ?git stash pop | 52 | bind status p ?git stash pop |
@@ -47,19 +55,17 @@ bind status a ?git commit --amend | |||
47 | bind status j :/^[MADRU?] | 55 | bind status j :/^[MADRU?] |
48 | bind status k :?^[MADRU?] | 56 | bind status k :?^[MADRU?] |
49 | 57 | ||
58 | # stash view | ||
50 | bind stash D ?git stash drop %(stash) | 59 | bind stash D ?git stash drop %(stash) |
51 | bind stash a ?git stash apply %(stash) | 60 | bind stash a ?git stash apply %(stash) |
52 | 61 | ||
62 | # refs view | ||
53 | bind refs C none | 63 | bind refs C none |
54 | bind refs c ?git checkout %(branch) | 64 | bind refs c ?git checkout %(branch) |
55 | bind refs d @git branch -d %(branch) | 65 | bind refs d @git branch -d %(branch) |
56 | bind refs b @git branch %(branch) %(commit) | 66 | bind refs b @git branch %(branch) %(commit) |
57 | 67 | ||
58 | set ignore-case = true | 68 | # color |
59 | set line-graphics = utf-8 | ||
60 | set refresh-mode = after-command | ||
61 | # set mouse = true | ||
62 | |||
63 | color diff-header black yellow | 69 | color diff-header black yellow |
64 | color diff-chunk white magenta | 70 | color diff-chunk white magenta |
65 | bind status <F4> !sh -c "git difftool -y \"$(git rev-parse --show-toplevel)/%(file)\"" | 71 | bind status <F4> !sh -c "git difftool -y \"$(git rev-parse --show-toplevel)/%(file)\"" |