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