'\" t .\" Title: tigrc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 11/22/2014 .\" Manual: Tig Manual .\" Source: Tig 2.0.2 .\" Language: English .\" .TH "TIGRC" "5" "11/22/2014" "Tig 2\&.0\&.2" "Tig Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" tigrc \- Tig configuration file .SH "SYNOPSIS" .sp .nf \fBset\fR \fIvariable\fR \fB=\fR \fIvalue\fR \fBbind\fR \fIkeymap\fR \fIkey\fR \fIaction\fR \fBcolor\fR \fIarea\fR \fIfgcolor\fR \fIbgcolor\fR \fI[attributes]\fR \fBsource\fR \fIpath\fR .fi .sp .SH "DESCRIPTION" .sp You can permanently set an option by putting it in the ~/\&.tigrc file\&. The file consists of a series of \fIcommands\fR\&. Each line of the file may contain only one command\&. Commands can span multiple lines if each line is terminated by a backslash (\fI\e\fR) character\&. .sp The hash mark (\fI#\fR) is used as a \fIcomment\fR character\&. All text after the comment character to the end of the line is ignored\&. You can use comments to annotate your initialization file\&. .SH "GIT CONFIGURATION" .sp Alternatively to using ~/\&.tigrc, Tig options can be set by putting them in one of the Git configuration files, which are read by Tig on startup\&. See \fIgit\-config(1)\fR for which files to use\&. The following example show the basic syntax to use for settings, bindings and colors\&. .sp .if n \{\ .RS 4 .\} .nf [tig] show\-rev\-graph = true [tig "color"] cursor = yellow red bold [tig "bind"] generic = P parent .fi .if n \{\ .RE .\} .sp .sp In addition to tig\-specific options, the following Git options are read from the Git configuration: .PP \fIcolor\&.*\fR .RS 4 Colors for the various UI types\&. Can be configured via the \fIgit\-colors\fR setting\&. .RE .PP \fIcore\&.abbrev\fR .RS 4 The width of the commit ID\&. See also \fIid\-width\fR option\&. .RE .PP \fIcore\&.editor\fR .RS 4 The editor command\&. Can be overridden by setting GIT_EDITOR\&. .RE .PP \fIcore\&.worktree\fR .RS 4 The path to the root of the working tree\&. .RE .PP \fIgui\&.encoding\fR .RS 4 The encoding to use for displaying of file content\&. .RE .PP \fIi18n\&.commitencoding\fR .RS 4 The encoding used for commits\&. The default is UTF\-8\&. .RE .SH "SET COMMAND" .sp A few selective variables can be configured via the set command\&. The syntax is: .sp .if n \{\ .RS 4 .\} .nf \fBset\fR variables \fB=\fR value .fi .if n \{\ .RE .\} .sp .sp Examples: .sp .if n \{\ .RS 4 .\} .nf set commit\-order = topo # Order commits topologically set git\-colors = no # Do not read Git\*(Aqs color settings\&. set horizontal\-scroll = 33% # Scroll 33% of the view width set blame\-options = \-C \-C \-C # Blame lines from other files # Wrap branch names with () and tags with <> set reference\-format = (branch) # Configure blame view columns using command spanning multiple lines\&. set blame\-view = \e date:default \e author:abbreviated \e file\-name:auto \e id:yes,color \e line\-number:yes,interval=5 text .fi .if n \{\ .RE .\} .sp .sp Or in the Git configuration files: .sp .if n \{\ .RS 4 .\} .nf [tig] line\-graphics = no # Disable graphics characters tab\-size = 8 # Number of spaces per tab .fi .if n \{\ .RE .\} .sp .sp The type of variables is either bool, int, string, or mixed\&. .PP Valid bool values .RS 4 To set a bool variable to true use either "1", "true", or "yes"\&. Any other value will set the variable to false\&. .RE .PP Valid int values .RS 4 A non\-negative integer\&. .RE .PP Valid string values .RS 4 A string of characters\&. Optionally, use either \*(Aq or " as delimiters\&. .RE .PP Valid mixed values .RS 4 These values are composites of the above types\&. The valid values are specified in the description\&. .RE .SS "Variables" .sp The following variables can be set: .PP \fIdiff\-options\fR (string) .RS 4 A space separated string of diff options to use in the diff view\&. git\-show(1) is used for formatting and always passes \-\-patch\-with\-stat\&. This option overrides any options specified in the TIG_DIFF_OPTS environment variable (described in \fBtig\fR(1)), but is itself overridden by diff flags given on the command line invocation\&. .RE .PP \fIblame\-options\fR (string) .RS 4 A space separated string of extra blame options\&. Can be used for telling git\-blame(1) how to detect the origin of lines\&. The value is ignored when Tig is started in blame mode and given blame options on the command line\&. .RE .PP \fIreference\-format\fR (string) .RS 4 A space separated string of format strings used for formatting reference names\&. Wrap the name of the reference type with the characters you would like to use for formatting, e\&.g\&. [tag] and \&. If no format is specified for local\-tag, the format for tag is used\&. Similarly, if no format is specified for tracked\-remote the remote format is used\&. Prefix with hide: to not show that reference type, e\&.g\&. hide:remote\&. Supported reference types are: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} head : The current HEAD\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} tag : A signed tag\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} local\-tag : An unsigned tag\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} remote : A remote\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} tracked\-remote : The remote tracked by current HEAD\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} replace : A replaced reference\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} branch : Any other reference\&. .RE .RE .PP \fIline\-graphics\fR (mixed) [ascii|default|utf\-8|] .RS 4 What type of character graphics for line drawing\&. .RE .PP \fIhorizontal\-scroll\fR (mixed) .RS 4 Interval to scroll horizontally in each step\&. Can be specified either as the number of columns, e\&.g\&. \fI5\fR, or as a percentage of the view width, e\&.g\&. \fI33%\fR, where the maximum is 100%\&. For percentages it is always ensured that at least one column is scrolled\&. The default is to scroll \fI50%\fR of the view width\&. .RE .PP \fIgit\-colors\fR (list) .RS 4 A space separated list of "key=value" pairs where the key is a Git color name and the value is a Tig color name, e\&.g\&. "branch\&.current=main\-head" and "grep\&.filename=grep\&.file"\&. Set to "no" to disable\&. .RE .PP \fIshow\-notes\fR (mixed) [|] .RS 4 Whether to show notes for a commit\&. When set to a note reference the reference is passed to git show \-\-notes=\&. Notes are enabled by default\&. .RE .PP \fIshow\-changes\fR (bool) .RS 4 Whether to show staged and unstaged changes in the main view\&. .RE .PP \fIvertical\-split\fR (mixed) [auto|] .RS 4 Whether to split the view horizontally or vertically\&. "auto" (which is the default) means that it will depend on the window dimensions\&. When true vertical orientation is used, and false sets the orientation to horizontal\&. .RE .PP \fIsplit\-view\-height\fR (mixed) .RS 4 Height of the lower view in a split view\&. Can be specified either as the number of rows, e\&.g\&. \fI5\fR, or as a percentage of the view height, e\&.g\&. \fI80%\fR, where the maximum is 100%\&. It is always ensured that the smaller of the views is at least four rows high\&. The default is a view height of \fI66%\fR\&. .RE .PP \fIstatus\-untracked\-dirs\fR (bool) .RS 4 Show untracked directories contents in the status view (analog to git ls\-files \-\-directory option)\&. On by default\&. .RE .PP \fItab\-size\fR (int) .RS 4 Number of spaces per tab\&. The default is 8 spaces\&. .RE .PP \fIdiff\-context\fR (int) .RS 4 Number of context lines to show for diffs\&. .RE .PP \fIignore\-space\fR (mixed) [no|all|some|at\-eol|] .RS 4 Ignore space changes in diff view\&. By default no space changes are ignored\&. Changing this to "all", "some" or "at\-eol" is equivalent to passing "\-\-ignore\-all\-space", "\-\-ignore\-space" or "\-\-ignore\-space\-at\-eol" respectively to git diff or git show\&. .RE .PP \fIcommit\-order\fR (mixed) [default|topo|date|author\-date|reverse|] .RS 4 Commit ordering using the default (chronological reverse) order, topological order, date order or reverse order\&. The default order is used when the option is set to false, and topo order when set to true\&. Note that topological order is automatically used in the main view when the commit graph is enabled and the commit order is set to the default\&. .RE .PP \fIignore\-case\fR (bool) .RS 4 Ignore case in searches\&. By default, the search is case sensitive\&. .RE .PP \fIwrap\-lines\fR (bool) .RS 4 Wrap long lines\&. By default, lines are not wrapped\&. Not compatible with line numbers enabled\&. .RE .PP \fIfocus\-child\fR (bool) .RS 4 Whether to focus the child view when it is opened\&. When disabled the focus will remain in the parent view, avoiding reloads of the child view when navigating the parent view\&. True by default\&. .RE .PP \fIeditor\-line\-number\fR (bool) .RS 4 Whether to pass the selected line number to the editor command\&. The line number is passed as + in front of the file name\&. Example: vim +10 tig\&.c .RE .PP \fImouse\fR (bool) .RS 4 Whether to enable mouse support\&. Off by default since it makes selecting text from the terminal less intuitive\&. When enabled hold down Shift (or Option on Mac) to select text\&. Mouse support requires that ncurses itself support mouse events\&. .RE .PP \fImouse\-scroll\fR (int) .RS 4 Interval to scroll up or down using the mouse\&. The default is 3 lines\&. Mouse support requires that ncurses itself support mouse events and that you have enabled mouse support in ~/\&.tigrc with set mouse = true\&. .RE .PP \fIrefresh\-mode\fR (mixed) [manual|auto|after\-command|periodic|] .RS 4 Configures how views are refreshed based on modifications to watched files in the repository\&. When set to \fImanual\fR, nothing is refreshed automatically\&. When set to \fIauto\fR, views are refreshed when a modification is detected\&. When set to \fIafter\-command\fR only refresh after returning from an external command\&. When set to \fIperiodic\fR, visible views are refreshed periodically using \fIrefresh\-interval\fR\&. .RE .PP \fIrefresh\-interval\fR (int) .RS 4 Interval in seconds between view refresh update checks when \fIrefresh\-mode\fR is set to \fIperiodic\fR\&. .RE .SS "View settings" .sp The view settings define the order and options for the different columns of a view\&. Each view setting expects a space separated list of column specifications\&. Column specifications starts with the column type, and can optionally be followed by a colon (:) and a list of column options\&. E\&.g\&. the following column specification defines an \fIauthor\fR column displaying the author email and with a maximum width of 20 characters: author:email,width=20\&. .sp The first option value in a column specification is always the \fIdisplay\fR option\&. When no \fIdisplay\fR value is given, \fIyes\fR is assumed\&. For \fIdisplay\fR options expecting an enumerated value this will automatically resolve to the default enum value\&. For example, file\-name will automatically have its \fIdisplay\fR setting resolve to \fIauto\fR\&. .sp Examples: .sp .if n \{\ .RS 4 .\} .nf # Enable both ID and line numbers in the blame view set blame\-view = date:default author:full file\-name:auto id:yes,color \e line\-number:yes,interval=5 text # Change grep view to be similar to `git grep` format set grep\-view = file\-name:yes line\-number:yes,interval=1 text # Show file sizes as units set tree\-view = line\-number:no,interval=5 mode author:full \e file\-size:units date:default id:no file\-name # Show line numbers for every 10th line in the pager view set pager\-view = line\-number:yes,interval=10 text .fi .if n \{\ .RE .\} .sp .sp The following list shows which the available view settings and what column types they support: .PP blob\-view, diff\-view, log\-view, pager\-view, stage\-view .RS 4 line\-number, text .RE .PP blame\-view .RS 4 author, date, file\-name, id, line\-number, text .RE .PP grep\-view .RS 4 file\-name, line\-number, text .RE .PP main\-view .RS 4 author, date, commit\-title, id, line\-number .RE .PP refs\-view .RS 4 author, date, commit\-title, id, line\-number, ref .RE .PP stash\-view .RS 4 author, date, commit\-title, id, line\-number .RE .PP status\-view .RS 4 file\-name, line\-number, status .RE .PP tree\-view .RS 4 author, date, id, file\-name, file\-size, line\-number, mode .RE .sp Supported column types and their respective column options: .PP author .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (mixed) [full|abbreviated|email|email\-user|]: How to display author names\&. If set to "abbreviated" author initials will be shown\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the column\&. When set to a value between 1 and 10, the author name will be abbreviated to the author\(cqs initials\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP commit\-title .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIgraph\fR (bool): Whether to show revision graph in the main view on start\-up\&. See also the \fIline\-graphics\fR options\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIrefs\fR (bool): Whether to show references (branches, tags, and remotes) in the main view\&. Can be toggled\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIoverflow\fR (bool or int): Whether to highlight text in commit titles exceeding a given width\&. When set to a boolean, it enables or disables the highlighting using the default width of 50 character\&. When set to an int, the assigned value is used as the maximum character width\&. .RE .RE .PP date .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (mixed) [relative|short|default|local|]: How to display dates\&. If set to "relative" a relative date will be used, e\&.g\&. "2 minutes ago"\&. If set to "short" no time information is shown\&. If set to "local", localtime(3) is used\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the column\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP file\-name .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (mixed) [auto|always|]: When to display file names\&. If set to "auto" file names are shown only when needed, e\&.g\&. when running: tig blame \-C \&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the column\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP file\-size .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (mixed) [default|units|]: How to display file sizes\&. When set to "units", sizes are shown using binary prefixes, e\&.g\&. 12524 bytes is shown as "12\&.2K"\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the filename column\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP id .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (bool): Whether to show commit IDs in the main view\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int) : Width of the commit ID\&. When unset Tig will use the value of \fIcore\&.abbrev\fR if found\&. See git\-config(1) on how to set \fIcore\&.abbrev\fR\&. When set to zero the width is automatically sized to fit the content of reflog (e\&.g\&. ref/stash@{4}) IDs and otherwise default to 7\&. .RE .RE .PP line\-number .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (bool): Whether to show line numbers\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIinterval\fR (int): Interval between line numbers\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the column\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP mode .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (bool): Whether to show file modes\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the column\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP ref .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (bool): Whether to show the reference name\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the column\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP status .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIdisplay\fR (mixed) [no|short|long|]: How to display the status label\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIwidth\fR (int): Width of the column\&. When set to zero, the width is automatically sized to fit the content\&. .RE .RE .PP text .RS 4 .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIcommit\-title\-overflow\fR (bool or int): Whether to highlight commit titles exceeding a given width in the diff view\&. When set to a boolean, it enables or disables the highlighting using the default width of 50 character\&. When set to an int, the assigned value is used as the maximum character width\&. .RE .RE .sp All column options can be toggled\&. For \fIdisplay\fR options, use the option name as the prefix followed by a dash and the column name\&. E\&.g\&. :toggle author\-display will toggle the \fIdisplay\fR option in the \fIauthor\fR column\&. For all other options use the column name followed by a dash and then the option name as the suffix\&. E\&.g\&. :toggle commit\-title\-graph will toggle the \fIgraph\fR option in the \fIcommit\-title\fR column\&. .SH "BIND COMMAND" .sp Using bind commands, keys can be mapped to an action when pressed in a given key map\&. The syntax is: .sp .if n \{\ .RS 4 .\} .nf \fBbind\fR \fIkeymap\fR \fIkey\fR \fIaction\fR .fi .if n \{\ .RE .\} .sp .sp Examples: .sp .if n \{\ .RS 4 .\} .nf # Add keybinding to quickly jump to the next diff chunk in the stage view bind stage Enter :/^@@ # Disable the default mapping for running git\-gc bind generic G none # User\-defined external command to amend the last commit bind status + !git commit \-\-amend # User\-defined internal command that reloads ~/\&.tigrc bind generic S :source ~/\&.tigrc # UTF8\-encoded characters can be used as key values\&. bind generic \(/o @sh \-c "printf \*(Aq%s\*(Aq %(commit) | pbcopy" .fi .if n \{\ .RE .\} .sp .sp Or in the Git configuration files: .sp .if n \{\ .RS 4 .\} .nf [tig "bind"] # \*(Aqunbind\*(Aq the default quit key binding main = Q none # Cherry\-pick current commit onto current branch generic = C !git cherry\-pick %(commit) .fi .if n \{\ .RE .\} .sp .sp Keys are mapped by first searching the keybindings for the current view, then the keybindings for the \fBgeneric\fR keymap, and last the default keybindings\&. Thus, the view keybindings override the generic keybindings which override the built\-in keybindings\&. .PP Keymaps .RS 4 Valid keymaps are: \fBmain\fR, \fBdiff\fR, \fBlog\fR, \fBhelp\fR, \fBpager\fR, \fBstatus\fR, \fBstage\fR, \fBtree\fR, \fBblob\fR, \fBblame\fR, \fBrefs\fR, \fBstash\fR, \fBgrep\fR and \fBgeneric\fR\&. Use \fBgeneric\fR to set key mapping in all keymaps\&. .RE .PP Key values .RS 4 Key values should never be quoted\&. Use either an ASCII or UTF8\-encoded character or one of the following symbolic key names\&. Symbolic key names are case insensitive and starts with "<" and ends with ">"\&. Use \fB\fR to bind to the # key, since the hash mark is used as a comment character\&. Use \fB\fR to bind to the < key\&. .RE .sp \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR or \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR or \fB\fR, \fB\fR or \fB\fR, \fB\fR, \fB\fR or \fB\fR, \fB\fR, \fB\fR, \fB\fR or \fB\fR, \fB\fR or \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR, \fB\fR\&. .sp To define key mappings with the Ctrl key, use \&. In addition, key combos consisting of an initial Escape key followed by a normal key value can be bound using key\&. .sp Examples: .sp .if n \{\ .RS 4 .\} .nf bind main R reload bind main next bind main scroll\-page\-down bind main o options .fi .if n \{\ .RE .\} .sp .sp Note that due to the way ncurses encodes Ctrl key mappings, Ctrl\-m and Ctrl\-i cannot be bound as they conflict with \fIEnter\fR and \fITab\fR respectively\&. Furthermore, ncurses does not allow to distinguish between Ctrl\-f and Ctrl\-F\&. Finally, Ctrl\-z is automatically used for process control and will suspend Tig and open a subshell (use fg to reenter Tig)\&. .PP Actions .RS 4 Actions are either specified as user\-defined commands (external or internal) or using action names as described in the following sections\&. .RE .SS "External user\-defined command" .sp These actions start with one or more of the following option flags followed by the command that should be executed\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp ! T}:T{ .sp Run the command in the foreground with output shown\&. T} T{ .sp @ T}:T{ .sp Run the command in the background with no output\&. T} T{ .sp ? T}:T{ .sp Prompt the user before executing the command\&. T} T{ .sp < T}:T{ .sp Exit Tig after executing the command\&. T} .TE .sp 1 .sp Unless otherwise specified, commands are run in the foreground with their console output shown (as if \fI!\fR was specified)\&. When multiple command options are specified their behavior are combined, e\&.g\&. "? !git publish .fi .if n \{\ .RE .\} .sp .RE .SS "Internal user\-defined commands" .sp Actions beginning with a \fI:\fR will be run and interpreted as internal commands and act similar to commands run via Tig\(cqs prompt\&. Valid internal commands are configuration file options (as described in this document) and pager view commands\&. Examples: .sp .if n \{\ .RS 4 .\} .nf # Reload ~/\&.tigrc when \*(AqS\*(Aq is pressed bind generic S :source \&.tigrc # Change diff view to show all commit changes regardless of file limitations bind diff F :set diff\-options = \-\-full\-diff # Show the output of git\-reflog(1) in the pager view bind generic W :!git reflog # Search for previous diff (c)hunk and next diff header bind stage 2 :?^@@ bind stage D :/^diff \-\-(git|cc) bind main I :toggle show\-id # Show/hide the ID column bind diff D :toggle diff\-options \-\-minimal # Use minimal diff algorithm bind diff [ :toggle diff\-context \-3 # Decrease context (\-U arg) bind diff ] :toggle diff\-context +3 # Increase context bind generic V :toggle split\-view\-height \-10% # Decrease split height .fi .if n \{\ .RE .\} .sp .sp Similar to external commands, pager view commands can contain variable names that will be substituted before the command is run\&. .SS "Action names" .sp Valid action names are described below\&. Note, all action names are case\-insensitive, and you may use \fI\-\fR, \fI_\fR, and \fI\&.\fR interchangeably, e\&.g\&. "view\-main", "View\&.Main", and "VIEW_MAIN" are the same\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBView switching\fR .RS 4 .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp view\-main T}:T{ .sp Show main view T} T{ .sp view\-diff T}:T{ .sp Show diff view T} T{ .sp view\-log T}:T{ .sp Show log view T} T{ .sp view\-tree T}:T{ .sp Show tree view T} T{ .sp view\-blob T}:T{ .sp Show blob view T} T{ .sp view\-blame T}:T{ .sp Show blame view T} T{ .sp view\-refs T}:T{ .sp Show refs view T} T{ .sp view\-status T}:T{ .sp Show status view T} T{ .sp view\-stage T}:T{ .sp Show stage view T} T{ .sp view\-stash T}:T{ .sp Show stash view T} T{ .sp view\-grep T}:T{ .sp Show grep view T} T{ .sp view\-pager T}:T{ .sp Show pager view T} T{ .sp view\-help T}:T{ .sp Show help view T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBView manipulation\fR .RS 4 .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp enter T}:T{ .sp Enter and open selected line T} T{ .sp back T}:T{ .sp Go back to the previous view state T} T{ .sp next T}:T{ .sp Move to next T} T{ .sp previous T}:T{ .sp Move to previous T} T{ .sp parent T}:T{ .sp Move to parent T} T{ .sp view\-next T}:T{ .sp Move focus to the next view T} T{ .sp refresh T}:T{ .sp Reload and refresh view T} T{ .sp maximize T}:T{ .sp Maximize the current view T} T{ .sp view\-close T}:T{ .sp Close the current view T} T{ .sp quit T}:T{ .sp Close all views and quit T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBView specific actions\fR .RS 4 .TS tab(:); lt lt lt lt lt lt lt lt lt lt. T{ .sp status\-update T}:T{ .sp Stage/unstage chunk or file changes T} T{ .sp status\-revert T}:T{ .sp Revert chunk or file changes T} T{ .sp status\-merge T}:T{ .sp Merge file using external tool T} T{ .sp stage\-update\-line T}:T{ .sp Stage/unstage single line T} T{ .sp stage\-split\-chunk T}:T{ .sp Split current diff chunk T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCursor navigation\fR .RS 4 .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp move\-up T}:T{ .sp Move cursor one line up T} T{ .sp move\-down T}:T{ .sp Move cursor one line down T} T{ .sp move\-page\-down T}:T{ .sp Move cursor one page down T} T{ .sp move\-page\-up T}:T{ .sp Move cursor one page up T} T{ .sp move\-first\-line T}:T{ .sp Move cursor to first line T} T{ .sp move\-last\-line T}:T{ .sp Move cursor to last line T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBScrolling\fR .RS 4 .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp scroll\-line\-up T}:T{ .sp Scroll one line up T} T{ .sp scroll\-line\-down T}:T{ .sp Scroll one line down T} T{ .sp scroll\-page\-up T}:T{ .sp Scroll one page up T} T{ .sp scroll\-page\-down T}:T{ .sp Scroll one page down T} T{ .sp scroll\-first\-col T}:T{ .sp Scroll to the first line columns T} T{ .sp scroll\-left T}:T{ .sp Scroll two columns left T} T{ .sp scroll\-right T}:T{ .sp Scroll two columns right T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBSearching\fR .RS 4 .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp search T}:T{ .sp Search the view T} T{ .sp search\-back T}:T{ .sp Search backwards in the view T} T{ .sp find\-next T}:T{ .sp Find next search match T} T{ .sp find\-prev T}:T{ .sp Find previous search match T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBOption manipulation\fR .RS 4 .sp In addition to the actions below, options can also be toggled with the :toggle prompt command\&. .TS tab(:); lt lt. T{ .sp options T}:T{ .sp Open the options menu T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMisc\fR .RS 4 .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp edit T}:T{ .sp Open in editor T} T{ .sp prompt T}:T{ .sp Open the prompt T} T{ .sp screen\-redraw T}:T{ .sp Redraw the screen T} T{ .sp stop\-loading T}:T{ .sp Stop all loading views T} T{ .sp show\-version T}:T{ .sp Show version information T} T{ .sp none T}:T{ .sp Do nothing T} .TE .sp 1 .RE .SH "COLOR COMMAND" .sp Color commands control highlighting and the user interface styles\&. If your terminal supports color, these commands can be used to assign foreground and background combinations to certain areas\&. Optionally, an attribute can be given as the last parameter\&. The syntax is: .sp .if n \{\ .RS 4 .\} .nf \fBcolor\fR \fIarea\fR \fIfgcolor\fR \fIbgcolor\fR \fI[attributes]\fR .fi .if n \{\ .RE .\} .sp .sp Examples: .sp .if n \{\ .RS 4 .\} .nf # Override the default terminal colors to white on black\&. color default white black # Diff colors color diff\-header yellow default color diff\-index blue default color diff\-chunk magenta default color "Reported\-by:" green default # View specific color color tree\&.date black cyan bold .fi .if n \{\ .RE .\} .sp .sp Or in the Git configuration files: .sp .if n \{\ .RS 4 .\} .nf [tig "color"] # A strange looking cursor line cursor = red default underline # UI colors title\-blur = white blue title\-focus = white blue bold # View specific color [tig "color\&.tree"] date = cyan default bold .fi .if n \{\ .RE .\} .sp .PP Area names .RS 4 Can be either a built\-in area name or a custom quoted string\&. The latter allows custom color rules to be added for lines matching a quoted string\&. Valid built\-in area names are described below\&. Note, all names are case\-insensitive, and you may use \fI\-\fR, and \fI_\fR interchangeably, e\&.g\&. "Diff\-Header" and "DIFF_HEADER" are the same\&. View specific colors can be defined by prefixing the view name to the area name, e\&.g\&. "stage\&.diff\-chunk" and "diff\&.diff\-chunk"\&. .RE .PP Color names .RS 4 Valid colors include: \fBwhite\fR, \fBblack\fR, \fBgreen\fR, \fBmagenta\fR, \fBblue\fR, \fBcyan\fR, \fByellow\fR, \fBred\fR, \fBdefault\fR\&. Use \fBdefault\fR to refer to the default terminal colors, for example, to keep the background transparent when you are using a terminal with a transparent background\&. .sp Colors can also be specified using the keywords \fBcolor0\fR, \fBcolor1\fR, \&..., \fBcolorN\-1\fR (where \fBN\fR is the number of colors supported by your terminal)\&. This is useful when you remap the colors for your display or want to enable colors supported by 88\-color and 256\-color terminals\&. Note that the \fIcolor\fR prefix is optional\&. If you prefer, you can specify colors directly by their numbers \fB0\fR, \fB1\fR, \&..., \fBN\-1\fR instead, just like in the configuration file of Git\&. .RE .PP Attribute names .RS 4 Valid attributes include: \fBnormal\fR, \fBblink\fR, \fBbold\fR, \fBdim\fR, \fBreverse\fR, \fBstandout\fR, and \fBunderline\fR\&. Note, not all attributes may be supported by the terminal\&. .RE .SS "UI colors" .sp The colors and attributes to be used for the text that is not highlighted or that specify the use of the default terminal colors can be controlled by setting the \fBdefault\fR color option\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&1.\ \&General .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp default T}:T{ .sp Override default terminal colors (see above)\&. T} T{ .sp cursor T}:T{ .sp The cursor line\&. T} T{ .sp status T}:T{ .sp The status window showing info messages\&. T} T{ .sp title\-focus T}:T{ .sp The title window for the current view\&. T} T{ .sp title\-blur T}:T{ .sp The title window of any backgrounded view\&. T} T{ .sp delimiter T}:T{ .sp Delimiter shown for truncated lines\&. T} T{ .sp header T}:T{ .sp The view header lines\&. Use \fIstatus\&.header\fR to color the staged, unstaged, and untracked sections in the status view\&. Use \fIhelp\&.header\fR to color the keymap sections in the help view\&. T} T{ .sp line\-number T}:T{ .sp Line numbers\&. T} T{ .sp id T}:T{ .sp The commit ID\&. T} T{ .sp date T}:T{ .sp The commit date\&. T} T{ .sp author T}:T{ .sp The commit author\&. T} T{ .sp mode T}:T{ .sp The file mode holding the permissions and type\&. T} T{ .sp overflow T}:T{ .sp Title text overflow\&. T} T{ .sp directory T}:T{ .sp The directory name\&. T} T{ .sp file T}:T{ .sp The file name\&. T} T{ .sp file\-size T}:T{ .sp File size\&. T} .TE .sp 1 .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&2.\ \&Main view colors .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp graph\-commit T}:T{ .sp The commit dot in the revision graph\&. T} T{ .sp palette\-[0\-6] T}:T{ .sp 7 different colors, used for distinguishing branches or commits\&. example: palette\-0 = red T} T{ .sp main\-commit T}:T{ .sp The commit comment\&. T} T{ .sp main\-head T}:T{ .sp Label of the current branch\&. T} T{ .sp main\-remote T}:T{ .sp Label of a remote\&. T} T{ .sp main\-tracked T}:T{ .sp Label of the remote tracked by the current branch\&. T} T{ .sp main\-tag T}:T{ .sp Label of a signed tag\&. T} T{ .sp main\-local\-tag T}:T{ .sp Label of a local tag\&. T} T{ .sp main\-ref T}:T{ .sp Label of any other reference\&. T} T{ .sp main\-replace T}:T{ .sp Label of replaced reference\&. T} .TE .sp 1 .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&3.\ \&Status view .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp stat\-none T}:T{ .sp Empty status label\&. T} T{ .sp stat\-staged T}:T{ .sp Status flag of staged files\&. T} T{ .sp stat\-unstaged T}:T{ .sp Status flag of unstaged files\&. T} T{ .sp stat\-untracked T}:T{ .sp Status flag of untracked files\&. T} .TE .sp 1 .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&4.\ \&Help view .TS tab(:); lt lt lt lt. T{ .sp help\-group T}:T{ .sp Help group name\&. T} T{ .sp help\-action T}:T{ .sp Help action name\&. T} .TE .sp 1 .SS "Highlighting" .PP Diff markup .RS 4 Options concerning diff start, chunks and lines added and deleted\&. .RE .sp \fBdiff\-header\fR, \fBdiff\-chunk\fR, \fBdiff\-add\fR, \fBdiff\-add2\fR, \fBdiff\-del\fR, \fBdiff\-del2\fR .PP Enhanced Git diff markup .RS 4 Extra diff information emitted by the Git diff machinery, such as mode changes, rename detection, and similarity\&. .RE .sp \fBdiff\-oldmode\fR, \fBdiff\-newmode\fR, \fBdiff\-copy\-from\fR, \fBdiff\-copy\-to\fR, \fBdiff\-similarity\fR, \fBdiff\-index\fR .PP Pretty print commit headers .RS 4 Commit diffs and the revision logs are usually formatted using pretty printed headers , unless \-\-pretty=raw was given\&. This includes lines, such as merge info, commit ID, and author and committer date\&. .RE .sp \fBpp\-refs\fR, \fBpp\-reflog\fR, \fBpp\-reflogmsg\fR, \fBpp\-merge\fR .PP Raw commit header .RS 4 Usually shown when \-\-pretty=raw is given, however \fIcommit\fR is pretty much omnipresent\&. .RE .sp \fBcommit\fR, \fBparent\fR, \fBtree\fR, \fBauthor\fR, \fBcommitter\fR .PP Commit message .RS 4 Signed\-off\-by, Acked\-by, Reviewed\-by and Tested\-by lines are colorized\&. Characters in the commit title exceeding a predefined width can be highlighted\&. .RE .PP Tree markup .RS 4 Colors for information of the tree view\&. .RE .sp \fBtree\-dir\fR, \fBtree\-file\fR .SH "SOURCE COMMAND" .sp Source commands make it possible to read additional configuration files\&. Sourced files are included in\-place, meaning when a \fIsource\fR command is encountered the file will be immediately read\&. Any commands later in the current configuration file will take precedence\&. The syntax is: .sp .if n \{\ .RS 4 .\} .nf \fBsource\fR \fIpath\fR .fi .if n \{\ .RE .\} .sp .sp Examples: .sp .if n \{\ .RS 4 .\} .nf source ~/\&.tig/colorscheme\&.tigrc source ~/\&.tig/keybindings\&.tigrc .fi .if n \{\ .RE .\} .sp .SH "COPYRIGHT" .sp Copyright (c) 2006\-2014 Jonas Fonseca <\m[blue]\fBjonas\&.fonseca@gmail\&.com\fR\m[]\&\s-2\u[1]\d\s+2> .sp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&. .SH "SEE ALSO" .sp \fBtig\fR(1), \fBtigmanual\fR(7), git(7), git\-config(1) .SH "NOTES" .IP " 1." 4 jonas.fonseca@gmail.com .RS 4 \%mailto:jonas.fonseca@gmail.com .RE