-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtigrc
257 lines (238 loc) · 12.4 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# Tig default configuration
#
# Please see 'man tigrc' for a complete reference.
# Settings
# --------
# Most of these settings can be toggleable, either via the toggle-*
# actions or via the option menu (bound to `o` by default).
# View settings
#
# Supported column types and their options:
#
# author
# - display (enum) [no|full|abbreviated|email|email-user]
# : Show author information?
# commit-title
# - display (bool) : Show the commit title?
# - graph (enum) [no|v2|v1] : Show the commit graph? (main view only)
# - refs (bool) : Show branches, tags and remotes? (main view only)
# - overflow (boolint) : Highlight overflows? Defaults to 50 when enabled.
#
# date
# - display (enum) [no|default|relative|relative-compact|custom]
# : Show dates?
# - local (bool) : Show local dates?
# - format (string) : Custom strftime(3) format
#
# file-name
# - display (enum) [no|always|auto] : Show file names?
#
# file-size
# - display (enum) [no|default|units] : Show file sizes?
#
# id
# - display (bool) : Show commit/tree ID?
#
# line-number
# - display (bool) : Show line numbers?
# - interval (int) : Interval between line numbers; defaults to 5
#
# mode
# - display (bool) : Show file modes?
#
# status
# - display (enum) [no|short|long] : Show status label?
#
# text
# - display (bool) : Show text?
# - commit-title-overflow (boolint) : Highlight overflow in log and diff view?
#
# All columns also support a width option to configure the max width of
# the column. Use zero (the default value) to auto-size the column based
# on the content.
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:no,local=true author:full commit-title:yes,graph,refs,overflow=no
set refs-view = line-number:no id:no 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
# Pager based views
set pager-view = line-number:no,interval=5 text
set stage-view = line-number:no,interval=5 text
set log-view = line-number:no,interval=5 text
set blob-view = line-number:no,interval=5 text
set diff-view = line-number:no,interval=5 text:yes,commit-title-overflow=no
# UI display settings
set show-changes = yes # Show changes commits in the main view?
set wrap-lines = no # Wrap long lines in pager views?
set tab-size = 8 # Number of spaces to use when expanding tabs
set line-graphics = default # Enum: ascii, default, utf-8
# Format reference names based on type.
# - head : The current HEAD.
# - tag : A signed tag.
# - local-tag : An unsigned tag.
# - remote : A remote.
# - tracked-remote : The remote tracked by current HEAD.
# - replace : A replaced reference.
# - branch : Any other reference.
# If no format is defined for `local-tag` then the one for `tag` is used.
# Similarly, `remote` is used if no `tracked-remote` format exists.
# Prefix with `hide:` to not show that reference type, e.g. `hide:remote`.
# Expects a space separated list of format strings.
set reference-format = [branch] <tag> {remote} ~replace~
# Settings controlling how content is read from Git
set commit-order = auto # Enum: auto, default, topo, date, reverse (main)
set ignore-space = no # Enum: no, all, some, at-eol (diff)
set show-notes = yes # When non-bool passed as `--show-notes=...` (diff)
# set diff-context = 3 # Number of lines to show around diff changes (diff)
# set diff-options = -C # User-defined options for `tig show` (git-diff)
# set diff-highlight = true # String (or bool): Path to diff-highlight script, defaults to
# `diff-highlight`.
# set blame-options = -C -C -C # User-defined options for `tig blame` (git-blame)
# set log-options = --pretty=raw # User-defined options for `tig log` (git-log)
# set main-options = -n 1000 # User-defined options for `tig` (git-log)
# set mailmap = yes # Use .mailmap to show canonical name and email address
# Misc
set refresh-mode = periodic # Enum: manual, auto, after-command, periodic
set refresh-interval = 2 # Interval in seconds between refreshes
set ignore-case = smart-case # Ignore case when searching?
set wrap-search = yes # Wrap around to top/bottom of view when searching
set focus-child = yes # Move focus to child view when opened?
set horizontal-scroll = 50% # Number of columns to scroll as % of width
set split-view-height = 67% # Height of the bottom view for horizontal splits
set vertical-split = auto # Enum: horizontal, vertical, auto; Use auto to
# switch to horizontal split when width allows it
set split-view-width = 50% # Width of right-most view for vertical splits
set editor-line-number = yes # Automatically pass line number to editor? Used
# for opening file at specific line e.g. from a diff
set mouse = no # Enable mouse support?
set mouse-scroll = 3 # Number of lines to scroll via the mouse
# User-defined commands
# ---------------------
# These commands allow to run shell commands directly from within Tig.
# Unless otherwise specified, commands are run in the foreground with
# their console output shown (as if '!' was specified). When multiple
# command options are specified their behavior are combined, e.g. "?<git
# commit" will prompt the user whether to execute the command and will
# exit Tig after completion.
#
# ! Run the command in the foreground with output shown.
# @ Run the command in the background with no output.
# ? Prompt the user before executing the command.
# < Exit Tig after executing the command.
#
# User-defined commands can optionally refer to Tig's internal state
# using the following variable names, which are substituted before
# commands are run:
#
# %(head) The current ref ID. Defaults to HEAD
# %(commit) The current commit ID.
# %(blob) The current blob ID.
# %(branch) The current branch name.
# %(remote) The current remote name.
# %(tag) The current tag name.
# %(stash) The current stash name.
# %(directory) The current directory path in the tree view;
# empty for the root directory.
# %(file) The currently selected file.
# %(ref) The reference given to blame or HEAD if undefined.
# %(revargs) The revision arguments passed on the command line.
# %(fileargs) The file arguments passed on the command line.
# %(cmdlineargs) All other options passed on the command line.
# %(diffargs) The diff options from `diff-options` or `TIG_DIFF_OPTS`
# %(prompt) Prompt for the argument value.
bind main C ?git cherry-pick %(commit)
bind main <C-r> ?git revert %(commit)
bind status C !git commit
bind stash A ?git stash apply %(stash)
bind stash P ?git stash pop %(stash)
bind stash ! ?git stash drop %(stash)
bind refs C ?git checkout %(branch)
bind refs b !git checkout -b "%(prompt [checkout -b] Nom de la branche: )" %(refname)
bind refs B ?git checkout -B "%(prompt [checkout -B] Nom de la branche: )" %(refname)
bind refs <C-r> ?git branch -m %(branch) "%(prompt [branch -m] Nom de la branche: )"
bind refs <C-f> ?git fetch %(remote) %(branch)
bind refs <C-c> !@sh -c "git rev-parse --abbrev-ref %(refname) | tr -d '\\n' | clip.exe"
bind refs <C-h> :set rev-args =
bind refs <C-@> :set rev-args = master %(refname)
bind refs <Space> :set rev-args = master %(revargs) %(refname)
bind tree <C-h> :set file-args =
bind tree <Space> :set file-args = %(fileargs) %(file)
bind refs r ?git rebase %(refname)
bind refs <C-b> ?git rebase -i %(refname)
bind refs p ?git push -u %(remote) %(branch)%(tag)
bind refs <C-p> ?git push -f %(remote) %(branch)%(tag)
bind main <C-b> !@git branch "%(prompt [branch] Nom de la branche: )" %(commit)
bind main b !git checkout -b "%(prompt [checkout -b] Nom de la branche: )" %(commit)
bind main B ?git checkout -B "%(prompt [checkout -B] Nom de la branche: )" %(commit)
bind main <C-v> !git revert %(commit)
bind refs ! ?sh -c "git update-ref -d $(git rev-parse --symbolic-full-name %(refname))"
# Normal commands
# ---------------
# View switching
bind generic m view-main
bind generic d view-diff
bind generic l view-log
bind generic t view-tree
bind generic f view-blob
bind generic b view-blame
bind generic r view-refs
bind generic p view-pager
bind generic h view-help
bind generic s view-status
bind generic S view-status # Compat binding to avoid going crazy!
bind generic c view-stage
bind generic y view-stash
bind generic <C-g> view-grep
# View manipulation
bind generic <Enter> enter # Enter and open selected entry
bind generic <Lt> back # Go back to the previous view state
bind generic <Down> next # Move to next
bind generic J next
bind generic <Up> previous # Move to previous
bind generic K previous
bind generic , parent # Move to parent
bind generic <Tab> view-next # Move focus to the next view
bind generic R refresh # Reload and refresh view
bind generic <F5> refresh
bind generic O maximize # Maximize the current view
bind generic q view-close # Close the current view
bind generic Q quit # Close all views and quit
# Manipulation des options
bind generic <C-o> :set main-options = "%(prompt set main-options = )" # git-log
bind main <C-p> :set main-options = --grep="%(prompt set main-options = --grep=)" # --grep=
bind main <C-f> :set file-args = "%(prompt set file-args = )" # Filtre sur les fichiers
# View specific
bind status u status-update # Stage/unstage changes in file
bind status ! status-revert # Revert changes in file
bind status M status-merge # Open git-mergetool(1)
# bind status ??? :toggle status # Show short or long status labels
bind stage u status-update # Stage/unstage current diff (c)hunk
bind stage 1 stage-update-line # Stage/unstage current line
bind stage ! status-revert # Revert current diff (c)hunk
bind stage \ stage-split-chunk # Split current diff (c)hunk
bind stage @ :/^@@ # Jump to next (c)hunk
bind stage [ :toggle diff-context -1 # Decrease the diff context
bind stage ] :toggle diff-context +1 # Increase the diff context
bind diff @ :/^@@ # Jump to next (c)hunk
bind diff [ :toggle diff-context -1
bind diff ] :toggle diff-context +1
bind main <C-t> :toggle commit-title-graph # Toggle revision graph visualization
bind main F :toggle commit-title-refs # Toggle reference display (tags/branches)
# Cursor navigation
bind generic j move-down
bind generic k move-up
bind generic <C-D> move-half-page-down
bind generic <C-U> move-half-page-up
bind generic <PgDown> move-page-down
bind generic <Space> move-page-down
bind generic <PgUp> move-page-up
bind generic - move-page-up
bind generic g move-first-line
bind generic G move-last-line
bind main G move-last-line
# Misc
bind main <C-c> !@sh -c "git rev-parse %(commit) | tr -d '\\n' | xclip -selection c"
bind tree <C-c> !@sh -c "echo %(file) | xclip -selection c"
# vim: set sts=4 ts=4 sw=4 tw=120 et :