6 tigrc - tig configuration file
12 .............................................................................
13 *set* 'variable' *=* 'value'
14 *bind* 'keymap' 'key' 'action'
15 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
16 .............................................................................
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
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.
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
37 A few selective variables can be configured via the set command. The syntax
41 ..............................................................................
42 *set* variables *=* value
43 ..............................................................................
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 --------------------------------------------------------------------------
57 Or in the git configuration files:
59 --------------------------------------------------------------------------
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 --------------------------------------------------------------------------
67 The type of variables are either bool, int, string, or mixed.
71 To set a bool variable to true use either "1", "true", or "yes".
72 Any other value will set the variable to false.
76 A non-negative integer.
80 A string of characters. Optionally, use either ' or " as delimiters.
84 These values are composites of the above types. The valid values are
85 specified in the description.
90 The following variables can be set:
92 'show-author' (bool)::
94 'show-rev-graph' (bool)::
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
101 'author-width' (int)::
103 Width of the author column. When set to 5 or below, the author name
104 will be abbreviated to the author's initials.
106 'line-graphics' (bool)::
108 Whether to use graphic characters for line drawing.
110 'line-number-interval' (int)::
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
118 Number of spaces per tab. The default is 8 spaces.
120 'horizontal-scroll' (mixed)::
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.
128 'commit-encoding' (string)::
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`.
137 Using bind commands keys can be mapped to an action when pressed in a given
138 key map. The syntax is:
141 ..............................................................................
142 *bind* 'keymap' 'key' 'action'
143 ..............................................................................
147 --------------------------------------------------------------------------
149 bind main w scroll-line-up
150 bind main s scroll-line-down
151 bind main space enter
154 bind diff b move-first-line
155 # An external command to update from upstream
156 bind generic F !git fetch
157 --------------------------------------------------------------------------
159 Or in the git configuration files:
161 --------------------------------------------------------------------------
163 # 'unbind' the default quit key binding
165 # Cherry-pick current commit onto current branch
166 generic = C !git cherry-pick %(commit)
167 --------------------------------------------------------------------------
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.
178 Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
179 and *generic*. Use *generic* to set key mapping in all keymaps.
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
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*.
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.
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
208 ifdef::backend-xhtml11[]
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 ------------------------------------------------------------------------------
223 As an example, the following external command will save the current commit as
224 a patch file: "!git format-patch -1 %(commit)".
226 ifdef::backend-xhtml11[]
228 `-----------------------`-----------------------------------------------------
229 endif::backend-xhtml11[]
231 ------------------------------------------------------------------------------
232 view-main Show main view
233 view-diff Show diff view
234 view-log Show log view
235 view-tree Show tree view
236 view-blob Show blob view
237 view-blame Show blame view
238 view-status Show status view
239 view-stage Show stage view
240 view-pager Show pager view
241 view-help Show help page
242 ------------------------------------------------------------------------------
244 ifdef::backend-xhtml11[]
246 `-----------------------`-----------------------------------------------------
247 endif::backend-xhtml11[]
249 ------------------------------------------------------------------------------
250 enter Enter current line and scroll
252 previous Move to previous
253 parent Move to parent
254 view-next Move focus to next view
255 refresh Reload and refresh view
256 maximize Maximize the current view
257 view-close Close the current view
258 quit Close all views and quit
259 ------------------------------------------------------------------------------
261 ifdef::backend-xhtml11[]
263 `-----------------------`-----------------------------------------------------
264 endif::backend-xhtml11[]
265 View specific actions:
266 ------------------------------------------------------------------------------
267 status-update Update file status
268 status-merge Resolve unmerged file
269 stage-next Find next chunk to stage
270 ------------------------------------------------------------------------------
272 ifdef::backend-xhtml11[]
274 `-----------------------`-----------------------------------------------------
275 endif::backend-xhtml11[]
277 ------------------------------------------------------------------------------
278 move-up Move cursor one line up
279 move-down Move cursor one line down
280 move-page-down Move cursor one page down
281 move-page-up Move cursor one page up
282 move-first-line Move cursor to first line
283 move-last-line Move cursor to last line
284 ------------------------------------------------------------------------------
286 ifdef::backend-xhtml11[]
288 `-----------------------`-----------------------------------------------------
289 endif::backend-xhtml11[]
291 ------------------------------------------------------------------------------
292 scroll-line-up Scroll one line up
293 scroll-line-down Scroll one line down
294 scroll-page-up Scroll one page up
295 scroll-page-down Scroll one page down
296 scroll-left Scroll one column left
297 scroll-right Scroll one column right
298 ------------------------------------------------------------------------------
300 ifdef::backend-xhtml11[]
302 `-----------------------`-----------------------------------------------------
303 endif::backend-xhtml11[]
305 ------------------------------------------------------------------------------
306 search Search the view
307 search-back Search backwards in the view
308 find-next Find next search match
309 find-prev Find previous search match
310 ------------------------------------------------------------------------------
312 ifdef::backend-xhtml11[]
314 `-----------------------`-----------------------------------------------------
315 endif::backend-xhtml11[]
317 ------------------------------------------------------------------------------
318 prompt Bring up the prompt
319 screen-redraw Redraw the screen
320 screen-resize Resize the screen
321 show-version Show version information
322 stop-loading Stop all loading views
323 toggle-lineno Toggle line numbers
324 toggle-date Toggle date display
325 toggle-author Toggle author display
326 toggle-rev-graph Toggle revision graph visualization
327 toggle-refs Toggle reference display
330 ------------------------------------------------------------------------------
336 Color commands control highlighting and the user interface styles. If your
337 terminal supports color, these commands can be used to assign foreground and
338 background combinations to certain areas. Optionally, an attribute can be
339 given as the last parameter. The syntax is:
342 ..............................................................................
343 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
344 ..............................................................................
348 ------------------------------------------------------------------------------
349 # Overwrite the default terminal colors to white on black.
350 color default white black
352 color diff-header yellow default
353 color diff-index blue default
354 color diff-chunk magenta default
355 --------------------------------------------------------------------------
357 Or in the git configuration files:
359 --------------------------------------------------------------------------
361 # A strange looking cursor line
362 cursor red default underline
364 title-blur white blue
365 title-focus white blue bold
366 ------------------------------------------------------------------------------
370 Valid area names are described below. Note, all names are
371 case-insensitive, and you may use '-', '_', and '.' interchangeably,
372 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
376 Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
377 *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
378 default terminal colors. This is recommended for background colors if
379 you are using a terminal with a transparent background.
381 Colors can also be specified using the keywords color0, color1, ..., colorN-1
382 (N being the number of colors supported by your terminal). This is useful when
383 you remap the colors for your display or want to enable colors supported by
388 Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
389 *standout*, and *underline*. Note, not all attributes may be supported
395 The colors and attributes to be used for the text that is not highlighted or
396 that specify the use of the default terminal colors can be controlled by
397 setting the *default* color option.
399 ifdef::backend-xhtml11[]
401 `-----------------------`-----------------------------------------------------
402 endif::backend-xhtml11[]
404 ------------------------------------------------------------------------------
405 default Overwrite default terminal colors (see above).
406 cursor The cursor line.
407 status The status window showing info messages.
408 title-focus The title window for the current view.
409 title-blur The title window of any backgrounded view.
410 delimiter Delimiter shown for truncated lines.
411 line-number Line numbers.
412 date The commit date.
413 author The commit author.
414 mode The file mode holding the permissions and type.
415 ------------------------------------------------------------------------------
417 ifdef::backend-xhtml11[]
419 `-----------------------`-----------------------------------------------------
420 endif::backend-xhtml11[]
422 ------------------------------------------------------------------------------
423 main-revgraph The revision graph.
424 main-commit The commit comment.
425 main-head Label of the current branch.
426 main-remote Label of a remote.
427 main-tracked Label of the remote tracked by the current branch.
428 main-tag Label of a signed tag.
429 main-local-tag Label of a local tag.
430 main-ref Label of any other reference.
431 ------------------------------------------------------------------------------
433 ifdef::backend-xhtml11[]
435 `-----------------------`-----------------------------------------------------
436 endif::backend-xhtml11[]
438 ------------------------------------------------------------------------------
439 stat-head The "On branch"-line.
440 stat-section Status section titles,
441 stat-staged Status flag of staged files.
442 stat-unstaged Status flag of unstaged files.
443 stat-untracked Status flag of untracked files.
444 ------------------------------------------------------------------------------
446 ifdef::backend-xhtml11[]
448 `-----------------------`-----------------------------------------------------
449 endif::backend-xhtml11[]
451 ------------------------------------------------------------------------------
452 blame-id The commit ID.
453 ------------------------------------------------------------------------------
455 ifdef::backend-xhtml11[]
457 `-----------------------`-----------------------------------------------------
458 endif::backend-xhtml11[]
460 ------------------------------------------------------------------------------
461 tree-head The "Directory /"-line
462 tree-dir The directory name.
463 tree-file The file name.
464 ------------------------------------------------------------------------------
473 Options concerning diff start, chunks and lines added and deleted.
475 *diff-header*, *diff-chunk*, *diff-add*, *diff-del*
477 Enhanced git diff markup::
479 Extra diff information emitted by the git diff machinery, such as mode
480 changes, rename detection, and similarity.
482 *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
483 *diff-rename-from*, *diff-rename-to*, *diff-similarity*, *diff-dissimilarity*
484 *diff-tree*, *diff-index*
486 Pretty print commit headers::
488 Commit diffs and the revision logs are usually formatted using pretty printed
489 headers , unless `--pretty=raw` was given. This includes lines, such as merge
490 info, commit ID, and author and committer date.
492 *pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*,
497 Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
500 *commit*, *parent*, *tree*, *author*, *committer*
504 For now only `Signed-off-by` and `Acked-by` lines are colorized.
510 Colors for information of the tree view.
512 *tree-dir*, *tree-file*
518 Copyright (c) 2006-2009 Jonas Fonseca <fonseca@diku.dk>
520 Licensed under the terms of the GNU General Public License.
524 manpage:tig[1], git-config(1),
525 and the http://jonas.nitro.dk/tig/manual.html[tig manual].