-
Notifications
You must be signed in to change notification settings - Fork 8
/
.tigrc
66 lines (56 loc) · 1.94 KB
/
.tigrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Appearance options
set id-width = 8
set blame-options = -C -C -C
# set horizontal-scroll = 33%
set show-notes = yes
set show-changes = yes
# set vertical-split = no
set split-view-height = 70%
set split-view-width = 70%
set status-show-untracked-dirs = yes
set tab-size = 2
set diff-context = 3
set ignore-space = some
set commit-order = topo
set ignore-case = yes
set wrap-lines = yes
set focus-child = yes
# Show commit ID in left of main view
set main-view = id date author:email-user commit-title:graph=yes,refs=yes
# Show line number in blame view
set blame-view = date:default author:email-user id:yes,color line-number:yes,interval=1 text
# Alias vim-like behavior
bind generic g move-first-line
bind generic G move-last-line
bind main g move-first-line
bind main G move-last-line
bind diff g move-first-line
bind diff G move-last-line
bind generic S view-stash
# Yank commit hash
bind generic y none
bind generic y !@sh -c "echo -n %(commit) | xsel --clipboard --input"
# git commit amend
bind generic + !git commit --amend
# Show line nuber
set pager-view = line-number:yes,interval=1 text
set stage-view = line-number:yes,interval=1 text
set log-view = line-number:yes,interval=1 text
set blob-view = line-number:yes,interval=1 text
set diff-view = line-number:yes,interval=1 text:yes,commit-title-overflow=no
# Execute rebase -i on selected commit
bind main R !git rebase -i %(commit)
bind diff R !git rebase -i %(commit)
# Refresh draw
bind generic Ctrl-l refresh
# Change commit diff color
color diff-header white cyan
color diff-chunk white magenta
# Execute git difftool on selected commit or branch
bind generic D none
bind main D !sh -c "git difftool %(commit)~ %(commit)"
bind diff D !sh -c "git difftool %(commit)~ %(commit)"
bind refs D !sh -c "git difftool %(branch)"
bind main . !sh -c "git diff --name-only %(commit)~ %(commit)"
bind diff . !sh -c "git diff --name-only %(commit)~ %(commit)"
bind refs . !sh -c "git diff --name-only %(branch)"