Add option to turn off automatic enabling of topo-order
[tig.git] / doc / tigrc.5.adoc
blob5dc5b863b93eedd9db84f509c27122ecc13fa411
1 tigrc(5)
2 ========
3 :docext: adoc
5 NAME
6 ----
7 tigrc - Tig configuration file
10 SYNOPSIS
11 --------
12 [verse]
13 _______________________________________________________________________
14 *set*   'variable' *=* 'value'
15 *bind*  'keymap' 'key' 'action'
16 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
17 *source* 'path'
18 _______________________________________________________________________
21 DESCRIPTION
22 -----------
24 You can permanently set an option by putting it in the `~/.tigrc` file.  The
25 file consists of a series of 'commands'.  Each line of the file may contain
26 only one command.  Commands can span multiple lines if each line is
27 terminated by a backslash ('\') character. 
29 The hash mark ('#') is used as a 'comment' character. All text after the
30 comment character to the end of the line is ignored. You can use comments to
31 annotate your initialization file.
33 Git configuration
34 -----------------
36 Alternatively to using `~/.tigrc`, Tig options can be set by putting them in
37 one of the Git configuration files, which are read by Tig on startup. See
38 'git-config(1)' for which files to use. The following example show the basic
39 syntax to use for settings, bindings and colors.
41 // TEST: gitconfig
42 --------------------------------------------------------------------------
43 [tig] show-changes = true
44 [tig "color"] cursor = yellow red bold 
45 [tig "bind"] generic = P parent
46 --------------------------------------------------------------------------
48 In addition to tig-specific options, the following Git options are read from
49 the Git configuration:
51 'color.*'::
53         Colors for the various UI types. Can be configured via the 'git-colors'
54         setting.
56 'core.abbrev'::
58         The width of the commit ID. See also 'id-width' option.
60 'core.editor'::
62         The editor command. Can be overridden by setting GIT_EDITOR.
64 'core.worktree'::
66         The path to the root of the working tree.
68 'gui.encoding'::
70         The encoding to use for displaying of file content.
72 'i18n.commitencoding'::
74         The encoding used for commits. The default is UTF-8.
76 Set command
77 -----------
79 A few selective variables can be configured via the set command. The syntax
80 is:
82 [verse]
83 *set* variables *=* value
85 Examples:
87 // TEST: tigrc
88 --------------------------------------------------------------------------
89 set commit-order = topo         # Order commits topologically
90 set git-colors = no             # Do not read Git's color settings.
91 set horizontal-scroll = 33%     # Scroll 33% of the view width
92 set blame-options = -C -C -C    # Blame lines from other files
94 # Wrap branch names with () and tags with <>
95 set reference-format = (branch) <tag>
97 # Configure blame view columns using command spanning multiple lines.
98 set blame-view = \
99         date:default \
100         author:abbreviated \
101         file-name:auto \
102         id:yes,color \
103         line-number:yes,interval=5 text
104 --------------------------------------------------------------------------
106 Or in the Git configuration files:
108 // TEST: gitconfig
109 --------------------------------------------------------------------------
110 [tig]
111         line-graphics = no      # Disable graphics characters
112         tab-size = 8            # Number of spaces per tab
113 --------------------------------------------------------------------------
115 The type of variables is either bool, int, string, or mixed.
117 Valid bool values::
119         To set a bool variable to true use either "1", "true", or "yes".
120         Any other value will set the variable to false.
122 Valid int values::
124         A non-negative integer.
126 Valid string values::
128         A string of characters. Optionally, use either ' or " as delimiters.
130 Valid mixed values::
132         These values are composites of the above types. The valid values are
133         specified in the description.
135 Variables
136 ~~~~~~~~~
138 The following variables can be set:
140 'diff-options' (string)::
142         A space separated string of diff options to use in the diff view.
143         git-show(1) is used for formatting and always passes --patch-with-stat.
144         This option overrides any options specified in the TIG_DIFF_OPTS
145         environment variable (described in manpage:tig[1]), but is itself
146         overridden by diff flags given on the command line invocation.
148 'blame-options' (string)::
150         A space separated string of extra blame options. Can be used for
151         telling git-blame(1) how to detect the origin of lines. The value
152         is ignored when Tig is started in blame mode and given blame options
153         on the command line.
155 'reference-format' (string)::
157         A space separated string of format strings used for formatting reference
158         names. Wrap the name of the reference type with the characters you would
159         like to use for formatting, e.g. `[tag]` and `<remote>`. If no format is
160         specified for `local-tag`, the format for `tag` is used. Similarly, if no
161         format is specified for `tracked-remote` the `remote` format is used.
162         Prefix with `hide:` to not show that reference type, e.g. `hide:remote`.
163         Supported reference types are:
164          - head                 : The current HEAD.
165          - tag                  : A signed tag.
166          - local-tag            : An unsigned tag.
167          - remote               : A remote.
168          - tracked-remote       : The remote tracked by current HEAD.
169          - replace              : A replaced reference.
170          - branch               : Any other reference.
172 'line-graphics' (mixed) [ascii|default|utf-8|<bool>]::
174         What type of character graphics for line drawing.
176 'horizontal-scroll' (mixed)::
178         Interval to scroll horizontally in each step. Can be specified either
179         as the number of columns, e.g. '5', or as a percentage of the view
180         width, e.g. '33%', where the maximum is 100%. For percentages it is
181         always ensured that at least one column is scrolled. The default is to
182         scroll '50%' of the view width.
184 'git-colors' (list)::
186         A space separated list of "key=value" pairs where the key is a Git color
187         name and the value is a Tig color name, e.g. "branch.current=main-head"
188         and "grep.filename=grep.file". Set to "no" to disable.
190 'show-notes' (mixed) [<reference>|<bool>]::
192         Whether to show notes for a commit. When set to a note reference the
193         reference is passed to `git show --notes=`. Notes are enabled by
194         default.
196 'show-changes' (bool)::
198         Whether to show staged and unstaged changes in the main view.
200 'vertical-split' (mixed) [auto|<bool>]::
202         Whether to split the view horizontally or vertically.
203         "auto" (which is the default) means that it will depend on the window
204         dimensions. When true vertical orientation is used, and false sets the
205         orientation to horizontal.
207 'split-view-height' (mixed)::
209         The height of the bottom view in a horizontally split display. Can be
210         specified either as the number of rows, e.g. '5', or as a percentage of
211         the view height, e.g. '80%', where the maximum is 100%. It is always
212         ensured that the smaller of the views is at least four rows high. The
213         default is '67%'.
215 'split-view-width' (mixed)::
217         Width of the right-most view in a vertically split display. Can be
218         specified either as the number of column, e.g. '5', or as a percentage
219         of the view width, e.g. '80%', where the maximum is 100%. It is always
220         ensured that the smaller of the views is at least four columns wide. The
221         default is '50%'.
223 'status-untracked-dirs' (bool)::
225         Show untracked directories contents in the status view (analog to
226         `git ls-files --directory` option). On by default.
228 'tab-size' (int)::
230         Number of spaces per tab. The default is 8 spaces.
232 'diff-context' (int)::
234         Number of context lines to show for diffs.
236 'ignore-space' (mixed) [no|all|some|at-eol|<bool>]::
238         Ignore space changes in diff view. By default no space changes are
239         ignored. Changing this to "all", "some" or "at-eol" is equivalent to
240         passing "--ignore-all-space", "--ignore-space" or
241         "--ignore-space-at-eol" respectively to `git diff` or `git show`.
243 'commit-order' (mixed) [default|topo|date|author-date|reverse|<bool>]::
245         Commit ordering using the default (chronological reverse) order,
246         topological order, date order or reverse order. The default order is
247         used when the option is set to false, and topo order when set to true.
248         Note that topological order is automatically used in the main view when
249         the commit graph is enabled and the commit order is set to the default.
251 'ignore-case' (bool)::
253         Ignore case in searches. By default, the search is case sensitive.
255 'wrap-lines' (bool)::
257         Wrap long lines. By default, lines are not wrapped.
258         Not compatible with line numbers enabled.
260 'focus-child' (bool)::
262         Whether to focus the child view when it is opened. When disabled the
263         focus will remain in the parent view, avoiding reloads of the child
264         view when navigating the parent view. True by default.
266 'editor-line-number' (bool)::
268         Whether to pass the selected line number to the editor command. The
269         line number is passed as `+<line-number>` in front of the file name.
270         Example: `vim +10 tig.c`
272 'mouse' (bool)::
274         Whether to enable mouse support. Off by default since it makes selecting
275         text from the terminal less intuitive. When enabled hold down Shift (or
276         Option on Mac) to select text. Mouse support requires that ncurses
277         itself support mouse events.
279 'mouse-scroll' (int)::
281         Interval to scroll up or down using the mouse. The default is 3 lines.
282         Mouse support requires that ncurses itself support mouse events and that
283         you have enabled mouse support in ~/.tigrc with `set mouse = true`.
285 'refresh-mode' (mixed) [manual|auto|after-command|periodic|<bool>]::
287         Configures how views are refreshed based on modifications to watched
288         files in the repository. When set to 'manual', nothing is refreshed
289         automatically. When set to 'auto', views are refreshed when a
290         modification is detected. When set to 'after-command' only refresh after
291         returning from an external command. When set to 'periodic', visible
292         views are refreshed periodically using 'refresh-interval'.
294 'refresh-interval' (int)::
296         Interval in seconds between view refresh update checks when
297         'refresh-mode' is set to 'periodic'.
299 'file-args' (args)::
301         Command line arguments referring to files. These are filtered using
302         `git-rev-parse(1)`.
304 'rev-args' (args)::
306         Command line arguments referring to revisions. These are filtered using
307         `git-rev-parse(1)`.
309 'cmdline-args' (args)::
311         All remaining command line arguments that are not either filtered into
312         'file-args' or 'rev-args'.
314 View settings
315 ~~~~~~~~~~~~~
317 The view settings define the order and options for the different columns of a
318 view. Each view setting expects a space separated list of column specifications.
319 Column specifications starts with the column type, and can optionally be
320 followed by a colon (`:`) and a list of column options. E.g. the following
321 column specification defines an 'author' column displaying the author email and
322 with a maximum width of 20 characters: `author:email,width=20`.
324 The first option value in a column specification is always the 'display' option.
325 When no 'display' value is given, 'yes' is assumed. For 'display' options
326 expecting an enumerated value this will automatically resolve to the default
327 enum value. For example, `file-name` will automatically have its 'display'
328 setting resolve to 'auto'.
330 Examples:
331 // TEST: tigrc
332 --------------------------------------------------------------------------
333 # Enable both ID and line numbers in the blame view
334 set blame-view = date:default author:full file-name:auto id:yes,color \
335                  line-number:yes,interval=5 text
337 # Change grep view to be similar to `git grep` format
338 set grep-view = file-name:yes line-number:yes,interval=1 text
340 # Show file sizes as units
341 set tree-view = line-number:no,interval=5 mode author:full \
342                 file-size:units date:default id:no file-name
344 # Show line numbers for every 10th line in the pager view
345 set pager-view = line-number:yes,interval=10 text
346 --------------------------------------------------------------------------
348 The following list shows which the available view settings and what column types
349 they support:
351 blob-view, diff-view, log-view, pager-view, stage-view:: line-number, text
352 blame-view:: author, date, file-name, id, line-number, text
353 grep-view:: file-name, line-number, text
354 main-view:: author, date, commit-title, id, line-number
355 refs-view:: author, date, commit-title, id, line-number, ref
356 stash-view:: author, date, commit-title, id, line-number
357 status-view:: file-name, line-number, status
358 tree-view:: author, date, id, file-name, file-size, line-number, mode
360 Supported column types and their respective column options:
362 author::
364         - 'display' (mixed) [full|abbreviated|email|email-user|<bool>]: How to
365           display author names. If set to "abbreviated" author initials will be
366           shown.
367         - 'width' (int): Width of the column. When set to a value between 1 and
368           10, the author name will be abbreviated to the author's initials.
369           When set to zero, the width is automatically sized to fit the content.
371 commit-title::
372         - 'graph' (mixed) [no|yes|no-topo]: Whether to show the revision graph
373           in the main view on start-up. If set to "no-topo" topo-order is not
374           automatically enabled. See also the 'line-graphics' options.
375         - 'refs' (bool): Whether to show references (branches, tags, and
376           remotes) in the main view. Can be toggled.
377         - 'overflow' (bool or int): Whether to highlight text in commit titles
378           exceeding a given width. When set to a boolean, it enables or disables
379           the highlighting using the default width of 50 character. When set to
380           an int, the assigned value is used as the maximum character width.
382 date::
383         - 'display' (mixed) [relative|short|default|local|<bool>]: How to
384           display dates. If set to "relative" a relative date will be used, e.g.
385           "2 minutes ago". If set to "short" no time information is shown.  If
386           set to "local", localtime(3) is used.
387         - 'width' (int): Width of the column. When set to zero, the width is
388           automatically sized to fit the content.
390 file-name::
391         - 'display' (mixed) [auto|always|<bool>]: When to display file names.
392           If set to "auto" file names are shown only when needed, e.g. when
393           running: tig blame -C <file>.
394         - 'width' (int): Width of the column. When set to zero, the width is
395           automatically sized to fit the content.
397 file-size::
398         - 'display' (mixed) [default|units|<bool>]: How to display file sizes.
399           When set to "units", sizes are shown using binary prefixes, e.g. 12524
400           bytes is shown as "12.2K".
401         - 'width' (int): Width of the filename column. When set to zero, the
402           width is automatically sized to fit the content.
404 id::
405         - 'display' (bool): Whether to show commit IDs in the main view.
406         - 'width' (int) : Width of the commit ID. When unset Tig will use the
407           value of 'core.abbrev' if found. See git-config(1) on how to set
408           'core.abbrev'. When set to zero the width is automatically sized to
409           fit the content of reflog (e.g.  `ref/stash@{4}`) IDs and otherwise
410           default to 7.
412 line-number::
413         - 'display' (bool): Whether to show line numbers.
414         - 'interval' (int): Interval between line numbers.
415         - 'width' (int): Width of the column. When set to zero, the width is
416           automatically sized to fit the content.
418 mode::
419         - 'display' (bool): Whether to show file modes.
420         - 'width' (int): Width of the column. When set to zero, the width is
421           automatically sized to fit the content.
423 ref::
424         - 'display' (bool): Whether to show the reference name.
425         - 'width' (int): Width of the column. When set to zero, the width is
426           automatically sized to fit the content.
428 status::
429         - 'display' (mixed) [no|short|long|<bool>]: How to display the status
430           label.
431         - 'width' (int): Width of the column. When set to zero, the width is
432           automatically sized to fit the content.
434 text::
435         - 'commit-title-overflow' (bool or int): Whether to highlight commit
436           titles exceeding a given width in the diff view. When set to a
437           boolean, it enables or disables the highlighting using the default
438           width of 50 character. When set to an int, the assigned value is used
439           as the maximum character width.
441 All column options can be toggled. For 'display' options, use the
442 option name as the prefix followed by a dash and the column name. E.g.
443 `:toggle author-display` will toggle the 'display' option in the 'author'
444 column. For all other options use the column name followed by a dash and
445 then the option name as the suffix. E.g. `:toggle commit-title-graph`
446 will toggle the 'graph' option in the 'commit-title' column.
448 Bind command
449 ------------
451 Using bind commands, keys can be mapped to an action when pressed in a given
452 key map. The syntax is:
454 [verse]
455 *bind* 'keymap' 'key' 'action'
457 Examples:
458 // TEST: tigrc
459 --------------------------------------------------------------------------
460 # Add keybinding to quickly jump to the next diff chunk in the stage view
461 bind stage <Enter> :/^@@
463 # Disable the default mapping for running git-gc
464 bind generic G none
466 # User-defined external command to amend the last commit
467 bind status + !git commit --amend
469 # User-defined internal command that reloads ~/.tigrc
470 bind generic S :source ~/.tigrc
472 # UTF8-encoded characters can be used as key values.
473 bind generic Ã¸ @sh -c "printf '%s' %(commit) | pbcopy"
474 --------------------------------------------------------------------------
476 Or in the Git configuration files:
477 // TEST: gitconfig
478 --------------------------------------------------------------------------
479 [tig "bind"]
480         # 'unbind' the default quit key binding
481         main = Q none
482         # Cherry-pick current commit onto current branch
483         generic = C !git cherry-pick %(commit)
484 --------------------------------------------------------------------------
486 Keys are mapped by first searching the keybindings for the current view, then
487 the keybindings for the *generic* keymap, and last the default keybindings.
488 Thus, the view keybindings override the generic keybindings which override the
489 built-in keybindings.
493 Keymaps::
495 Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
496 *tree*, *blob*, *blame*, *refs*, *stash*, *grep* and *generic*. Use *generic*
497 to set key mapping in all keymaps.
499 Key values::
501 Key values should never be quoted. Use either an ASCII or UTF8-encoded character
502 or one of the following symbolic key names. Symbolic key names are case
503 insensitive and starts with "<" and ends with ">". Use *<Hash>* to bind to the
504 `#` key, since the hash mark is used as a comment character. Use *<LessThan>* to
505 bind to the `<` key.
507 *<Enter>*, *<Space>*, *<Backspace>*, *<Tab>*, *<Escape>* or *<Esc>*, *<Left>*,
508 *<Right>*, *<Up>*, *<Down>*, *<Insert>* or *<Ins>*, *<Delete>* or *<Del>*,
509 *<Hash>*, *<LessThan>* or *<LT>*, *<Home>*, *<End>*, *<PageUp>* or *<PgUp>*,
510 *<PageDown>* or *<PgDown>*, *<F1>*, *<F2>*, *<F3>*, *<F4>*, *<F5>*, *<F6>*,
511 *<F7>*, *<F8>*, *<F9>*, *<F10>*, *<F11>*, *<F12>*.
513 To define key mappings with the `Ctrl` key, use `<Ctrl-key>`. In addition, key
514 combos consisting of an initial `Escape` key followed by a normal key value can
515 be bound using `<Esc>key`.
517 Examples:
518 // TEST: tigrc
519 --------------------------------------------------------------------------
520 bind main R             refresh
521 bind main <Down>        next
522 bind main <Ctrl-f>      scroll-page-down
523 bind main <Esc>o        options
524 --------------------------------------------------------------------------
526 Note that due to the way ncurses encodes `Ctrl` key mappings, `Ctrl-m` and
527 `Ctrl-i` cannot be bound as they conflict with 'Enter' and 'Tab' respectively.
528 Furthermore, ncurses does not allow to distinguish between `Ctrl-f` and
529 `Ctrl-F`. Finally, `Ctrl-z` is automatically used for process control and will
530 suspend Tig and open a subshell (use `fg` to reenter Tig).
532 Actions::
534 Actions are either specified as user-defined commands (external or internal) or
535 using action names as described in the following sections.
539 External user-defined command
540 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
542 These actions start with one or more of the following option flags followed by
543 the command that should be executed.
545 [frame="none",grid="none",cols="25<m,75<"]
546 |=============================================================================
547 |!                      |Run the command in the foreground with output shown.
548 |@                      |Run the command in the background with no output.
549 |?                      |Prompt the user before executing the command.
550 |<                      |Exit Tig after executing the command.
551 |=============================================================================
553 Unless otherwise specified, commands are run in the foreground with their
554 console output shown (as if '!' was specified). When multiple command options
555 are specified their behavior are combined, e.g. "?<git commit" will prompt the
556 user whether to execute the command and will exit Tig after completion.
558 Browsing state variables
559 ^^^^^^^^^^^^^^^^^^^^^^^^
561 User-defined commands can optionally refer to Tig's internal state using the
562 following variable names, which are substituted before commands are run:
564 [frame="none",grid="none",cols="25<m,75<"]
565 |=============================================================================
566 |%(head)                |The currently viewed 'head' ID. Defaults to HEAD
567 |%(commit)              |The currently selected commit ID.
568 |%(blob)                |The currently selected blob ID.
569 |%(branch)              |The currently selected branch name.
570 |%(remote)              |The currently selected remote name. For remote
571                          branches %(branch) will contain the branch name.
572 |%(tag)                 |The currently selected tag name.
573 |%(stash)               |The currently selected stash name.
574 |%(directory)           |The current directory path in the tree view or
575                          "." if undefined.
576 |%(file)                |The currently selected file.
577 |%(ref)                 |The reference given to blame or HEAD if undefined.
578 |%(revargs)             |The revision arguments passed on the command line.
579 |%(fileargs)            |The file arguments passed on the command line.
580 |%(cmdlineargs)         |All other options passed on the command line.
581 |%(diffargs)            |The diff options from 'diff-options' or 'TIG_DIFF_OPTS'
582 |%(prompt)              |Prompt for the argument value. Optionally specify a
583                          custom prompt using `"%(prompt Enter branch name: )"`
584 |=============================================================================
586 Examples:
587 // TEST: tigrc
588 --------------------------------------------------------------------------
589 # Save save the current commit as a patch file when the user selects a
590 # commit in the main view and presses 'S'.
591 bind main S !git format-patch -1 %(commit)
593 # Create and checkout a new branch; specify custom prompt
594 bind main B ?git checkout -b "%(prompt Enter new branch name: )"
595 --------------------------------------------------------------------------
597 Advanced shell-like commands
598 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
600 If your command requires use of dynamic features, such as subshells,
601 expansion of environment variables and process control, this can be achieved by
602 using a shell command:
604 .Configure a binding to copy the current commit ID to the clipboard.
605 // TEST: tigrc
606 --------------------------------------------------------------------------
607 bind generic I @sh -c "echo -n %(commit) | xclip -selection c"
608 --------------------------------------------------------------------------
610 Or by using a combination of Git aliases and Tig external commands. The
611 following example entries can be put in either the .gitconfig or .git/config
612 file:
614 .Git configuration which binds Tig keys to Git command aliases.
615 // TEST: gitconfig
616 --------------------------------------------------------------------------
617 [alias]
618         gitk-bg = !"gitk HEAD --not $(git rev-parse --remotes) &"
619         publish = !"for i in origin public; do git push $i; done"
620 [tig "bind"]
621         # @-prefix means that the console output will not be shown.
622         generic = V !@git gitk-bg
623         generic = > !git publish
624 --------------------------------------------------------------------------
626 Internal user-defined commands
627 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
629 Actions beginning with a ':' will be run and interpreted as internal commands
630 and act similar to commands run via Tig's prompt. Valid internal commands are
631 configuration file options (as described in this document) and pager view
632 commands. Examples:
634 // TEST: tigrc
635 --------------------------------------------------------------------------
636 # Reload ~/.tigrc when 'S' is pressed
637 bind generic S :source .tigrc
639 # Change diff view to show all commit changes regardless of file limitations
640 bind diff F :set diff-options = --full-diff
642 # Show the output of git-reflog(1) in the pager view
643 bind generic W :!git reflog
645 # Search for previous diff (c)hunk and next diff header
646 bind stage 2 :?^@@
647 bind stage D :/^diff --(git|cc)
649 bind main I :toggle id                          # Show/hide the ID column
650 bind diff D :toggle diff-options --minimal      # Use minimal diff algorithm
651 bind diff [ :toggle diff-context -3             # Decrease context (-U arg)
652 bind diff ] :toggle diff-context +3             # Increase context
653 bind generic V :toggle split-view-height -10%   # Decrease split height
654 --------------------------------------------------------------------------
656 Similar to external commands, pager view commands can contain variable names
657 that will be substituted before the command is run.
659 Action names
660 ~~~~~~~~~~~~
662 Valid action names are described below. Note, all action names are
663 case-insensitive, and you may use '-', '_', and '.' interchangeably, e.g.
664 "view-main", "View.Main", and "VIEW_MAIN" are the same.
666 ifndef::DOC_GEN_ACTIONS[]
667 View switching
668 ^^^^^^^^^^^^^^
670 [frame="none",grid="none",cols="25<m,75<"]
671 |=============================================================================
672 |view-main               |Show main view
673 |view-diff               |Show diff view
674 |view-log                |Show log view
675 |view-tree               |Show tree view
676 |view-blob               |Show blob view
677 |view-blame              |Show blame view
678 |view-refs               |Show refs view
679 |view-status             |Show status view
680 |view-stage              |Show stage view
681 |view-stash              |Show stash view
682 |view-grep               |Show grep view
683 |view-pager              |Show pager view
684 |view-help               |Show help view
685 |=============================================================================
687 View manipulation
688 ^^^^^^^^^^^^^^^^^
690 [frame="none",grid="none",cols="25<m,75<"]
691 |=============================================================================
692 |enter                   |Enter and open selected line
693 |back                    |Go back to the previous view state
694 |next                    |Move to next
695 |previous                |Move to previous
696 |parent                  |Move to parent
697 |view-next               |Move focus to the next view
698 |refresh                 |Reload and refresh view
699 |maximize                |Maximize the current view
700 |view-close              |Close the current view
701 |quit                    |Close all views and quit
702 |=============================================================================
704 View specific actions
705 ^^^^^^^^^^^^^^^^^^^^^
707 [frame="none",grid="none",cols="25<m,75<"]
708 |=============================================================================
709 |status-update           |Stage/unstage chunk or file changes
710 |status-revert           |Revert chunk or file changes
711 |status-merge            |Merge file using external tool
712 |stage-update-line       |Stage/unstage single line
713 |stage-split-chunk       |Split current diff chunk
714 |=============================================================================
716 Cursor navigation
717 ^^^^^^^^^^^^^^^^^
719 [frame="none",grid="none",cols="25<m,75<"]
720 |=============================================================================
721 |move-up                 |Move cursor one line up
722 |move-down               |Move cursor one line down
723 |move-page-up            |Move cursor one page up
724 |move-page-down          |Move cursor one page down
725 |move-half-page-up       |Move cursor half a page up
726 |move-half-page-down     |Move cursor half a page down
727 |move-first-line         |Move cursor to first line
728 |move-last-line          |Move cursor to last line
729 |=============================================================================
731 Scrolling
732 ^^^^^^^^^
734 [frame="none",grid="none",cols="25<m,75<"]
735 |=============================================================================
736 |scroll-line-up          |Scroll one line up
737 |scroll-line-down        |Scroll one line down
738 |scroll-page-up          |Scroll one page up
739 |scroll-page-down        |Scroll one page down
740 |scroll-first-col        |Scroll to the first line columns
741 |scroll-left             |Scroll two columns left
742 |scroll-right            |Scroll two columns right
743 |=============================================================================
745 Searching
746 ^^^^^^^^^
748 [frame="none",grid="none",cols="25<m,75<"]
749 |=============================================================================
750 |search                  |Search the view
751 |search-back             |Search backwards in the view
752 |find-next               |Find next search match
753 |find-prev               |Find previous search match
754 |=============================================================================
756 Option manipulation
757 ^^^^^^^^^^^^^^^^^^^
759 In addition to the actions below, options can also be toggled with the
760 `:toggle` prompt command.
762 [frame="none",grid="none",cols="25<m,75<"]
763 |=============================================================================
764 |options                 |Open the options menu
765 |=============================================================================
767 Misc
768 ^^^^
770 [frame="none",grid="none",cols="25<m,75<"]
771 |=============================================================================
772 |edit                    |Open in editor
773 |prompt                  |Open the prompt
774 |screen-redraw           |Redraw the screen
775 |stop-loading            |Stop all loading views
776 |show-version            |Show version information
777 |none                    |Do nothing
778 |=============================================================================
779 endif::DOC_GEN_ACTIONS[]
781 Color command
782 -------------
784 Color commands control highlighting and the user interface styles. If your
785 terminal supports color, these commands can be used to assign foreground and
786 background combinations to certain areas. Optionally, an attribute can be
787 given as the last parameter. The syntax is:
789 [verse]
790 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
792 Examples:
793 // TEST: tigrc
794 ------------------------------------------------------------------------------
795 # Override the default terminal colors to white on black.
796 color default           white   black
797 # Diff colors
798 color diff-header       yellow  default
799 color diff-index        blue    default
800 color diff-chunk        magenta default
801 color "Reported-by:"    green   default
802 # View specific color
803 color tree.date         black   cyan    bold
804 --------------------------------------------------------------------------
806 Or in the Git configuration files:
807 // TEST: gitconfig
808 --------------------------------------------------------------------------
809 [tig "color"]
810         # A strange looking cursor line
811         cursor          = red   default underline
812         # UI colors
813         title-blur      = white blue
814         title-focus     = white blue    bold
815 # View specific color
816 [tig "color.tree"]
817         date            = cyan  default bold
818 ------------------------------------------------------------------------------
820 Area names::
822         Can be either a built-in area name or a custom quoted string. The
823         latter allows custom color rules to be added for lines matching a
824         quoted string.
825         Valid built-in area names are described below. Note, all names are
826         case-insensitive, and you may use '-', and '_' interchangeably,
827         e.g. "Diff-Header" and "DIFF_HEADER" are the same.
828         View specific colors can be defined by prefixing the view name to
829         the area name, e.g. "stage.diff-chunk" and "diff.diff-chunk".
831 Color names::
833         Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
834         *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
835         default terminal colors, for example, to keep the background
836         transparent when you are using a terminal with a transparent
837         background.
839 Colors can also be specified using the keywords *color0*, *color1*, ...,
840 *colorN-1* (where *N* is the number of colors supported by your terminal).
841 This is useful when you remap the colors for your display or want to enable
842 colors supported by 88-color and 256-color terminals. Note that the 'color'
843 prefix is optional. If you prefer, you can specify colors directly by their
844 numbers *0*, *1*, ..., *N-1* instead, just like in the configuration file of
845 Git.
847 Attribute names::
849         Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
850         *standout*, and *underline*. Note, not all attributes may be supported
851         by the terminal.
853 UI colors
854 ~~~~~~~~~
856 The colors and attributes to be used for the text that is not highlighted or
857 that specify the use of the default terminal colors can be controlled by
858 setting the *default* color option.
860 .General
861 [frame="none",grid="none",cols="25<m,75<"]
862 |=============================================================================
863 |default                |Override default terminal colors (see above).
864 |cursor                 |The cursor line.
865 |status                 |The status window showing info messages.
866 |title-focus            |The title window for the current view.
867 |title-blur             |The title window of any backgrounded view.
868 |delimiter              |Delimiter shown for truncated lines.
869 |header                 |The view header lines. Use 'status.header' to color
870                          the staged, unstaged, and untracked sections in the
871                          status view. Use 'help.header' to color the keymap
872                          sections in the help view.
873 |line-number            |Line numbers.
874 |id                     |The commit ID.
875 |date                   |The author date.
876 |author                 |The commit author.
877 |mode                   |The file mode holding the permissions and type.
878 |overflow               |Title text overflow.
879 |directory              |The directory name.
880 |file                   |The file name.
881 |file-size              |File size.
882 |=============================================================================
884 .Main view colors
885 [frame="none",grid="none",cols="25<m,75<"]
886 |=============================================================================
887 |graph-commit           |The commit dot in the revision graph.
888 |palette-[0-13]         |14 different colors, used for distinguishing branches
889                          or commits. By default, the palette uses the ASCII
890                          colors, where the second half of them have the bold
891                          attribute enabled to give a brighter color.
892                          Example: palette-0 = red
893 |main-commit            |The commit comment.
894 |main-head              |Label of the current branch.
895 |main-remote            |Label of a remote.
896 |main-tracked           |Label of the remote tracked by the current branch.
897 |main-tag               |Label of a signed tag.
898 |main-local-tag         |Label of a local tag.
899 |main-ref               |Label of any other reference.
900 |main-replace           |Label of replaced reference.
901 |=============================================================================
903 .Status view
904 [frame="none",grid="none",cols="25<m,75<"]
905 |=============================================================================
906 |stat-none              |Empty status label.
907 |stat-staged            |Status flag of staged files.
908 |stat-unstaged          |Status flag of unstaged files.
909 |stat-untracked         |Status flag of untracked files.
910 |=============================================================================
912 .Help view
913 [frame="none",grid="none",cols="25<m,75<"]
914 |=============================================================================
915 |help-group             |Help group name.
916 |help-action            |Help action name.
917 |=============================================================================
919 Highlighting
920 ~~~~~~~~~~~~
924 Diff markup::
926 Options concerning diff start, chunks and lines added and deleted.
928 *diff-header*, *diff-chunk*, *diff-add*, *diff-add2*, *diff-del*,
929 *diff-del2*
931 Enhanced Git diff markup::
933 Extra diff information emitted by the Git diff machinery, such as mode
934 changes, rename detection, and similarity.
936 *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
937 *diff-similarity*, *diff-index*
939 Pretty print commit headers::
941 Commit diffs and the revision logs are usually formatted using pretty printed
942 headers , unless `--pretty=raw` was given. This includes lines, such as merge
943 info, commit ID, and author and committer date.
945 *pp-refs*, *pp-reflog*, *pp-reflogmsg*, *pp-merge*
947 Raw commit header::
949 Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
950 omnipresent.
952 *commit*, *parent*, *tree*, *author*, *committer*
954 Commit message::
956 `Signed-off-by`, `Acked-by`, `Reviewed-by` and `Tested-by` lines are colorized.
957 Characters in the commit title exceeding a predefined width can be highlighted.
960 Tree markup::
962 Colors for information of the tree view.
964 *tree-dir*, *tree-file*
968 Source command
969 -------------
971 Source commands make it possible to read additional configuration files.
972 Sourced files are included in-place, meaning when a 'source' command is
973 encountered the file will be immediately read. Any commands later in the
974 current configuration file will take precedence. The syntax is:
976 [verse]
977 *source* 'path'
979 Examples:
980 // TEST: tigrc
981 --------------------------------------------------------------------------
982 source ~/.tig/colorscheme.tigrc
983 source ~/.tig/keybindings.tigrc
984 --------------------------------------------------------------------------
986 COPYRIGHT
987 ---------
988 Copyright (c) 2006-2014 Jonas Fonseca <jonas.fonseca@gmail.com>
990 This program is free software; you can redistribute it and/or modify
991 it under the terms of the GNU General Public License as published by
992 the Free Software Foundation; either version 2 of the License, or
993 (at your option) any later version.
995 SEE ALSO
996 --------
997 ifndef::backend-docbook[]
998 link:tig.1.{docext}[tig(1)],
999 link:manual.{docext}[the Tig manual],
1000 endif::backend-docbook[]
1001 ifdef::backend-docbook[]
1002 manpage:tig[1],
1003 manpage:tigmanual[7],
1004 endif::backend-docbook[]
1005 git(7), git-config(1)