1TIGRC(5) Tig Manual TIGRC(5)
2
3
4
6 tigrc - tig configuration file
7
9 set variable = value
10 bind keymap key action
11 color area fgcolor bgcolor [attributes]
12
13
15 You can permanently set an option by putting it in the ~/.tigrc file.
16 The file consists of a series of commands. Each line of the file may
17 contain only one command.
18
19 The hash mark (#) is used as a comment character. All text after the
20 comment character to the end of the line is ignored. You can use
21 comments to annotate your initialization file.
22
23 Alternatively, options can be set by putting them in one of the git
24 configuration files, which are read by tig on startup. See
25 git-config(1) for which files to use.
26
28 A few selective variables can be configured via the set command. The
29 syntax is:
30
31 set variables = value
32
33
34 Examples:
35
36 set show-author = yes # Show author?
37 set show-date = relative # Show relative commit date.
38 set show-rev-graph = yes # Show revision graph?
39 set show-refs = yes # Show references?
40 set show-line-numbers = no # Show line numbers?
41 set line-number-interval = 5 # Interval between line numbers
42 set commit-encoding = "UTF-8" # Commit encoding
43 set horizontal-scroll = 33% # Scroll 33% of the view width
44
45
46 Or in the git configuration files:
47
48 [tig]
49 show-date = yes # Show commit date?
50 author-width = 10 # Set width of the author column
51 line-graphics = no # Disable graphics characters
52 tab-size = 8 # Number of spaces per tab
53
54
55 The type of variables are either bool, int, string, or mixed.
56
57 Valid bool values
58 To set a bool variable to true use either "1", "true", or "yes".
59 Any other value will set the variable to false.
60
61 Valid int values
62 A non-negative integer.
63
64 Valid string values
65 A string of characters. Optionally, use either ´ or " as
66 delimiters.
67
68 Valid mixed values
69 These values are composites of the above types. The valid values
70 are specified in the description.
71
72 Variables
73 The following variables can be set:
74
75 show-author (bool), show-rev-graph (bool), show-refs (bool)
76 Whether to show author, revision graph, and references (branches,
77 tags, and remotes) in the main view on start-up. Can all be
78 toggled.
79
80 show-date (bool or "relative" or "short")
81 Whether and how to show date. If set to "relative" a relative date
82 will be used, e.g. "2 minutes ago". If set to "short" no time
83 information is shown. Can be toggled.
84
85 author-width (int)
86 Width of the author column. When set to 5 or below, the author name
87 will be abbreviated to the author’s initials.
88
89 line-graphics (bool)
90 Whether to use graphic characters for line drawing.
91
92 line-number-interval (int)
93 Interval between line numbers. Note, you have to toggle on line
94 numbering with n or the -n command line option. The default is to
95 number every line.
96
97 tab-size (int)
98 Number of spaces per tab. The default is 8 spaces.
99
100 horizontal-scroll (mixed)
101 Interval to scroll horizontally in each step. Can be specified
102 either as the number of columns, e.g. 5, or as a percentage of the
103 view width, e.g. 33%, where the maximum is 100%. For percentages
104 it is always ensured that at least one column is scrolled. The
105 default is to scroll 50% of the view width.
106
107 split-view-height (mixed)
108 Height of the lower view in a split view. Can be specified either
109 as the number of rows, e.g. 5, or as a percentage of the view
110 height, e.g. 80%, where the maximum is 100%. It is always ensured
111 that the smaller of the views is at least four rows high. The
112 default is a view height of 66%.
113
114 commit-encoding (string)
115 The encoding used for commits. The default is UTF-8. Not this
116 option is shadowed by the "i18n.commitencoding" option in
117 .git/config.
118
120 Using bind commands keys can be mapped to an action when pressed in a
121 given key map. The syntax is:
122
123 bind keymap key action
124
125
126 Examples:
127
128 # A few keybindings
129 bind main w scroll-line-up
130 bind main s scroll-line-down
131 bind main space enter
132 bind diff a previous
133 bind diff d next
134 bind diff b move-first-line
135 # An external command to update from upstream
136 bind generic F !git fetch
137
138
139 Or in the git configuration files:
140
141 [tig "bind"]
142 # ´unbind´ the default quit key binding
143 main = Q none
144 # Cherry-pick current commit onto current branch
145 generic = C !git cherry-pick %(commit)
146
147
148 Keys are mapped by first searching the keybindings for the current
149 view, then the keybindings for the generic keymap, and last the default
150 keybindings. Thus, the view keybindings shadow the generic keybindings
151 which Shadow the built-in keybindings.
152
153 Keymaps
154 Valid keymaps are: main, diff, log, help, pager, status, stage,
155 tree, blob, blame, branch, and generic. Use generic to set key
156 mapping in all keymaps.
157
158 Key values
159 Key values should never be quoted. Use either the ASCII value or
160 one of the following symbolic key names. Symbolic key names are
161 case insensitive, Use Hash to bind to the # key, since the hash
162 mark is used as a comment character.
163
164 Enter, Space, Backspace, Tab, Escape, Left, Right, Up, Down, Insert,
165 Delete, Hash, Home, End, PageUp, PageDown, F1, F2, F3, F4, F5, F6, F7,
166 F8, F9, F10, F11, F12.
167
168 Action names
169 Valid action names are described below. Note, all names are
170 case-insensitive, and you may use -, _, and . interchangeably,
171 e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
172
173 Actions
174 Apart from the action names listed below, all actions starting with a !
175 will be available as an external command. External commands can contain
176 variable names that will be substituted before the command is run.
177 Valid variable names are:
178
179 Table 1. Browsing state variables
180 %(head) The currently viewed head
181 ID. Defaults to HEAD
182
183 %(commit) The currently selected
184 commit ID.
185
186 %(blob) The currently selected
187 blob ID.
188
189 %(directory) The current directory path
190 in the tree view; empty
191 for the root directory.
192
193 %(file) The currently selected
194 file.
195
196
197
198
199
200 %(ref) The reference given to
201 blame or HEAD if
202 undefined.
203
204
205 As an example, the following external command will save the current
206 commit as a patch file: "!git format-patch -1 %(commit)". If your
207 external command require use of dynamic features, such as subshells,
208 expansion of environment variables and process control, this can be
209 achieved by using a combination of git aliases and tig external
210 commands. The following example entries can be put in either the
211 .gitconfig or .git/config file:
212
213 [alias]
214 gitk-bg = !"gitk HEAD --not $(git rev-parse --remotes) &"
215 publish = !"for i in origin public; do git push $i; done"
216 [tig "bind"]
217 generic = V !git gitk-bg
218 generic = > !git publish
219
220
221 Table 2. View switching
222 view-main Show main view
223
224 view-diff Show diff view
225
226 view-log Show log view
227
228 view-tree Show tree view
229
230 view-blob Show blob view
231
232 view-blame Show blame view
233
234 view-branch Show branch view
235
236 view-status Show status view
237
238 view-stage Show stage view
239
240 view-pager Show pager view
241
242 view-help Show help page
243
244
245 Table 3. View manipulation
246 enter Enter current line and
247 scroll
248
249 next Move to next
250
251 previous Move to previous
252
253 parent Move to parent
254
255 view-next Move focus to next view
256
257 refresh Reload and refresh view
258
259 maximize Maximize the current view
260
261 view-close Close the current view
262
263 quit Close all views and quit
264
265
266 Table 4. View specific actions
267 status-update Update file status
268
269 status-merge Resolve unmerged file
270
271 stage-next Find next chunk to stage
272
273
274 Table 5. Cursor navigation
275 move-up Move cursor one line up
276
277 move-down Move cursor one line down
278
279 move-page-down Move cursor one page down
280
281 move-page-up Move cursor one page up
282
283 move-first-line Move cursor to first line
284
285 move-last-line Move cursor to last line
286
287
288 Table 6. Scrolling
289 scroll-line-up Scroll one line up
290
291 scroll-line-down Scroll one line down
292
293 scroll-page-up Scroll one page up
294
295 scroll-page-down Scroll one page down
296
297 scroll-left Scroll one column left
298
299 scroll-right Scroll one column right
300
301
302 Table 7. Searching
303 search Search the view
304
305 search-back Search backwards in the
306 view
307
308 find-next Find next search match
309
310 find-prev Find previous search match
311
312
313 Table 8. Misc
314 prompt Bring up the prompt
315
316 screen-redraw Redraw the screen
317
318 screen-resize Resize the screen
319
320 show-version Show version information
321
322 stop-loading Stop all loading views
323
324 options Open options menu
325
326 toggle-lineno Toggle line numbers
327
328 toggle-date Toggle date display
329
330
331
332 toggle-author Toggle author display
333
334 toggle-rev-graph Toggle revision graph
335 visualization
336
337 toggle-refs Toggle reference display
338
339 edit Open in editor
340
341 none Do nothing
342
343
345 Color commands control highlighting and the user interface styles. If
346 your terminal supports color, these commands can be used to assign
347 foreground and background combinations to certain areas. Optionally, an
348 attribute can be given as the last parameter. The syntax is:
349
350 color area fgcolor bgcolor [attributes]
351
352
353 Examples:
354
355 # Overwrite the default terminal colors to white on black.
356 color default white black
357 # Diff colors
358 color diff-header yellow default
359 color diff-index blue default
360 color diff-chunk magenta default
361
362
363 Or in the git configuration files:
364
365 [tig "color"]
366 # A strange looking cursor line
367 cursor red default underline
368 # UI colors
369 title-blur white blue
370 title-focus white blue bold
371
372
373 Area names
374 Valid area names are described below. Note, all names are
375 case-insensitive, and you may use -, _, and . interchangeably,
376 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
377
378 Color names
379 Valid colors include: white, black, green, magenta, blue, cyan,
380 yellow, red, default. Use default to refer to the default terminal
381 colors. This is recommended for background colors if you are using
382 a terminal with a transparent background.
383
384 Colors can also be specified using the keywords color0, color1,
385 ..., colorN-1 (N being the number of colors supported by your
386 terminal). This is useful when you remap the colors for your
387 display or want to enable colors supported by 256-color terminals.
388
389 Attribute names
390 Valid attributes include: normal, blink, bold, dim, reverse,
391 standout, and underline. Note, not all attributes may be supported
392 by the terminal.
393
394 UI colors
395 The colors and attributes to be used for the text that is not
396 highlighted or that specify the use of the default terminal colors can
397 be controlled by setting the default color option.
398
399 Table 9. General
400 default Overwrite default terminal
401 colors (see above).
402
403 cursor The cursor line.
404
405 status The status window showing
406 info messages.
407
408 title-focus The title window for the
409 current view.
410
411 title-blur The title window of any
412 backgrounded view.
413
414 delimiter Delimiter shown for
415 truncated lines.
416
417 line-number Line numbers.
418
419 date The commit date.
420
421 author The commit author.
422
423 mode The file mode holding the
424 permissions and type.
425
426
427 Table 10. Main view colors
428 main-revgraph The revision graph.
429
430 main-commit The commit comment.
431
432 main-head Label of the current
433 branch.
434
435 main-remote Label of a remote.
436
437 main-tracked Label of the remote
438 tracked by the current
439 branch.
440
441 main-tag Label of a signed tag.
442
443 main-local-tag Label of a local tag.
444
445 main-ref Label of any other
446 reference.
447
448
449 Table 11. Status view
450 stat-head The "On branch"-line.
451
452 stat-section Status section titles,
453
454 stat-staged Status flag of staged
455 files.
456
457 stat-unstaged Status flag of unstaged
458 files.
459
460 stat-untracked Status flag of untracked
461 files.
462
463
464 Table 12. Blame view
465 blame-id The commit ID.
466
467
468 Table 13. Tree view
469 tree-head The "Directory /"-line
470
471 tree-dir The directory name.
472
473 tree-file The file name.
474
475
476 Highlighting
477 Diff markup
478 Options concerning diff start, chunks and lines added and deleted.
479
480 diff-header, diff-chunk, diff-add, diff-del
481
482 Enhanced git diff markup
483 Extra diff information emitted by the git diff machinery, such as
484 mode changes, rename detection, and similarity.
485
486 diff-oldmode, diff-newmode, diff-copy-from, diff-copy-to,
487 diff-rename-from, diff-rename-to, diff-similarity, diff-dissimilarity
488 diff-tree, diff-index
489
490 Pretty print commit headers
491 Commit diffs and the revision logs are usually formatted using
492 pretty printed headers , unless --pretty=raw was given. This
493 includes lines, such as merge info, commit ID, and author and
494 committer date.
495
496 pp-author, pp-commit, pp-merge, pp-date, pp-adate, pp-cdate, pp-refs
497
498 Raw commit header
499 Usually shown when --pretty=raw is given, however commit is pretty
500 much omnipresent.
501
502 commit, parent, tree, author, committer
503
504 Commit message
505 For now only Signed-off-by and Acked-by lines are colorized.
506
507 signoff, acked
508
509 Tree markup
510 Colors for information of the tree view.
511
512 tree-dir, tree-file
513
515 Copyright (c) 2006-2009 Jonas Fonseca <fonseca@diku.dk[1]>
516
517 Licensed under the terms of the GNU General Public License.
518
520 manpage:tig[1], manpage:tigmanual[7], git-config(1), and the tig
521 manual[2].
522
524 1. fonseca@diku.dk
525 mailto:fonseca@diku.dk
526
527 2. tig manual
528 http://jonas.nitro.dk/tig/manual.html
529
530
531
532Tig 0.15 11/20/2009 TIGRC(5)