-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tigrc
58 lines (46 loc) · 1.96 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
# Rebind tig's default handlers for <Up> and <Down> (which do a weird thing
# by not following the focus) to <C-Up> and <C-Down>
bind generic <esc>[1;5A previous
bind generic <esc>[1;5B next
# Bind "reasonable" handlers that _do_ follow focus to <Up> and <Down>
bind generic <Up> move-up
bind generic <Down> move-down
# Binding for "reload configuration"
bind generic ;so :source ~/.tigrc
# Binding for "refresh"
bind generic <Ctrl-R> :refresh
bind generic <Ctrl-L> :refresh
# Main-view binding for "goto commit"
bind main <Ctrl-G> :goto "%(prompt Enter commit: )"
# Main-view binding for "delete branch"
bind main ! ?>git branch -D %(branch)
# "Create branch"
bind main ;br !>git branch -f "%(prompt Enter branch name: )" %(commit)
# "Interactive rebase onto this commit"
bind main ;rb ?!>git rebase-i --autostash %(commit)
# "Interactive rebase of current branch against this upstream,
# keeping the branch point (merge-base)"
bind main ;rk ?!>git rebase-i --autostash --keep-base %(commit)
# "Edit this commit by interactive rebase"
# TODO: make sure that %(commit) is an ancestor of HEAD
bind main ;rr ?!>git rebase-i --autostash %(commit)^
# Bindings for forms of `git reset`
bind main ;Rs @git reset --soft %(commit)
bind main ;Rr ?@git reset %(commit)
bind main ;RH ?@git reset --hard %(commit)
bind main ;RM ?>git reset --merge %(commit)
# Bindings for `git merge`
bind main ;M >git merge --ff-only %(commit)
bind main ;mm ?>git merge --ff %(commit)
bind main ;mr ?>git merge --rebase %(commit)
# Binding to find and open a PR for this commit
bind main ;pr +>git web-pr %(commit)
# Universal binding for `git checkout` of the branch or commit under cursor
# (see .gitconfig for `git zz-tig-checkout`)
bind main ;co !>git zz-tig-checkout +%(branch) +%(commit)
# Cherry-pick
bind main ;cp ?!>git cherry-pick %(commit)
# Binding to copy the sha1 under cursor
bind main ;yy !>git copy-ref %(commit)
bind main ;yr !>git copy-refer %(commit)
bind main ;yF !>git copy-fixes %(commit)