-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtigrc
61 lines (55 loc) · 3.58 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
# tig Config (ncurses git interface)
# ===== [ colors ] =====
# ======================
color cursor white black
color status white default
color title-focus white black
color date yellow default
color author green default
color main-head magenta default
color main-tag magenta default
color stat-staged green default
color stat-unstaged red default
color stat-untracked yellow default
color tree.header white default
color tree.directory cyan default
# ===== [ keyboard bindings ] =====
# =================================
bind generic F !git fetch # fetch new code remotely (no merge)
bind generic y !@bash -c "echo -n %(commit) | xclip" # copy current commit id
bind diff Y !@sh -c "git show %(commit) --pretty=format: --name-only | xargs | xsel -ib" # copy filename(s)
bind tree e !vim %(file) # edit selected file (in vim)
bind diff e !<sh -c "vim $(git show %(commit) --pretty=format: --name-only | xargs)" # edit all files of this commit (in vim)
bind diff E !<sh -c "vim -c 'Gedit %(commit)' $(ls | head -1)" # edit the commit diff (in vim)
bind diff c !git commit # commit
bind diff C !git commit -av # add all + commit
bind diff a !git add %(file) # add/stage current file
bind diff P !git add -p %(file) # add/stage current file (partially)
bind branch N !@git branch %(prompt)
bind branch C !@git checkout %(branch)
bind stage 1 stage-update-line # stage a single line
bind stage C !@git commit # commit staging changes
bind main R !git rebase -i --autosquash %(commit)^
bind main r !tig-rebase.sh reword %(commit) # edit commit message
bind main F !tig-rebase.sh fixup %(commit) # fixup with parent commit
bind main A !tig-rebase.sh abort # abort current rebase
#bind main + !tig-rebase.sh ascend %(commit) # rebase to move commit up
#bind main - !tig-rebase.sh descend %(commit) # rebase to move commit down
#bind diff <Up> move-up
#bind diff <Down> move-down
#bind branch D !@git branch -D %(branch)
#bind branch R !@git rebase
#bind status R !@git reset HEAD %(file)
#bind status A !@git commit --amend
#bind status N !@git add -N %(file)
# ===== [ other ] =====
# =====================
set blame-view = date:default author:full file-name:auto id:yes,color line-number:no,interval=5 text
set grep-view = file-name:no line-number:yes,interval=1 text
set main-view = line-number:no,interval=5 id:yes date:default author:full commit-title:yes,graph,refs,overflow=no
set refs-view = date:default author:full ref commit-title
set stash-view = line-number:no,interval=5 id:no date:default author:full commit-title
set status-view = line-number:no,interval=5 status:short file-name
set tree-view = line-number:no,interval=5 mode author:full file-size date:default id:no file-name
set horizontal-scroll = 33%
set line-graphics = yes