Disable opening views that require a git directory when in pager mode
[tig] / tigrc.5.txt
... / ...
CommitLineData
1tigrc(5)
2========
3
4NAME
5----
6tigrc - tig user configuration file
7
8
9SYNOPSIS
10--------
11[verse]
12.............................................................................
13*set* 'variable' *=* 'value'
14*bind* 'keymap' 'key' 'action'
15*color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
16.............................................................................
17
18
19DESCRIPTION
20-----------
21
22You can permanently set an option by putting it in the `~/.tigrc` file. The
23file consists of a series of 'commands'. Each line of the file may contain
24only one command.
25
26The hash mark ('#') is used as a 'comment' character. All text after the
27comment character to the end of the line is ignored. You can use comments to
28annotate your initialization file.
29
30
31Set command
32-----------
33
34A few selective variables can be configured via the set command. The syntax
35is:
36
37[verse]
38..............................................................................
39*set* variables *=* value
40..............................................................................
41
42Examples:
43
44--------------------------------------------------------------------------
45set show-author = yes # Show author?
46set show-date = yes # Show commit date?
47set show-rev-graph = yes # Show revision graph?
48set show-refs = yes # Show references?
49set show-line-numbers = no # Show line numbers?
50set line-number-interval = 5 # Interval between line numbers
51set tab-size = 8 # Number of spaces per tab
52set encoding = "UTF-8" # Commit encoding
53--------------------------------------------------------------------------
54
55The type of variables are either bool, int, and string.
56
57Valid bool values::
58
59 To set a bool variable to true use either "1", "true", or "yes".
60 Any other value will set the variable to false.
61
62Valid int values::
63
64 A non-negative integer.
65
66Valid string values::
67
68 A string of characters. Optionally, use either ' or " as delimiters.
69
70Variables
71~~~~~~~~~
72
73The following variables can be set:
74
75'show-author' (bool)::
76'show-date' (bool)::
77'show-rev-graph' (bool)::
78'show-refs' (bool)::
79
80 Whether to show author, date, revision graph, and references
81 (branches, tags, and remotes) in the main view on start-up. Can all be
82 toggled.
83
84'line-number-interval' (int)::
85
86 Interval between line numbers. Note, you have to toggle on line
87 numbering with 'n' or the `-n` command line option. The default is to
88 number every line.
89
90'tab-size' (int)::
91
92 Number of spaces per tab. The default is 8 spaces.
93
94'commit-encoding' (string)::
95
96 The encoding used for commits. The default is UTF-8. Not this option
97 is shadowed by the "i18n.commitencoding" option in `.git/config`.
98
99
100Bind command
101------------
102
103Using bind commands keys can be mapped to an action when pressed in a given
104key map. The syntax is:
105
106[verse]
107..............................................................................
108*bind* 'keymap' 'key' 'action'
109..............................................................................
110
111Examples:
112
113--------------------------------------------------------------------------
114# A few keybindings
115bind main w scroll-line-up
116bind main s scroll-line-down
117bind main space enter
118bind diff a previous
119bind diff d next
120bind diff b move-first-line
121# 'unbind' the default quit key binding
122bind main Q none
123# An external command to update from upstream
124bind generic F !git fetch
125# Cherry-pick current commit unto current branch
126bind generic C !git cherry-pick %(commit)
127--------------------------------------------------------------------------
128
129Keys are mapped by first searching the keybindings for the current view, then
130the keybindings for the *generic* keymap, and last the default keybindings.
131Thus, the view keybindings shadow the generic keybindings which Shadow the
132built-in keybindings.
133
134--
135
136Keymaps::
137
138Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
139and *generic*. Use *generic* to set key mapping in all keymaps.
140
141Key values::
142
143Key values should never be quoted. Use either the ASCII value or one of the
144following symbolic key names. Symbolic key names are case insensitive, Use
145*Hash* to bind to the `#` key, since the hash mark is used as a comment
146character.
147
148*Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*,
149*Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*,
150*F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*.
151
152Action names::
153
154Valid action names are described below. Note, all names are
155case-insensitive, and you may use '-', '_', and '.' interchangeably,
156e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
157
158--
159
160Actions
161~~~~~~~
162
163Apart from the action names listed below, all actions starting with a '!' will
164be available as an external command. External commands can contain variable
165names that will be substituted before the command is run. Valid variable names
166are "%(head)", "%(commit)", and "%(blob)".
167
168As an example, the following external command will save the current commit as
169a patch file: "!git format-patch %(commit)^..%(commit)".
170
171ifdef::backend-xhtml11[]
172[frame="none"]
173`-----------------------`-----------------------------------------------------
174endif::backend-xhtml11[]
175View switching:
176------------------------------------------------------------------------------
177view-main Show main view
178view-diff Show diff view
179view-log Show log view
180view-tree Show tree view
181view-blob Show blob view
182view-blame Show blame view
183view-status Show status view
184view-stage Show stage view
185view-pager Show pager view
186view-help Show help page
187------------------------------------------------------------------------------
188
189ifdef::backend-xhtml11[]
190[frame="none"]
191`-----------------------`-----------------------------------------------------
192endif::backend-xhtml11[]
193View manipulation:
194------------------------------------------------------------------------------
195enter Enter current line and scroll
196next Move to next
197previous Move to previous
198view-next Move focus to next view
199refresh Reload and refresh view
200view-close Close the current view
201quit Close all views and quit
202------------------------------------------------------------------------------
203
204ifdef::backend-xhtml11[]
205[frame="none"]
206`-----------------------`-----------------------------------------------------
207endif::backend-xhtml11[]
208Cursor navigation:
209------------------------------------------------------------------------------
210move-up Move cursor one line up
211move-down Move cursor one line down
212move-page-down Move cursor one page down
213move-page-up Move cursor one page up
214move-first-line Move cursor to first line
215move-last-line Move cursor to last line
216------------------------------------------------------------------------------
217
218ifdef::backend-xhtml11[]
219[frame="none"]
220`-----------------------`-----------------------------------------------------
221endif::backend-xhtml11[]
222Scrolling:
223------------------------------------------------------------------------------
224scroll-line-up Scroll one line up
225scroll-line-down Scroll one line down
226scroll-page-eup Scroll one page up
227scroll-page-down Scroll one page down
228------------------------------------------------------------------------------
229
230ifdef::backend-xhtml11[]
231[frame="none"]
232`-----------------------`-----------------------------------------------------
233endif::backend-xhtml11[]
234Searching:
235------------------------------------------------------------------------------
236search Search the view
237search-back Search backwards in the view
238find-next Find next search match
239find-prev Find previous search match
240------------------------------------------------------------------------------
241
242ifdef::backend-xhtml11[]
243[frame="none"]
244`-----------------------`-----------------------------------------------------
245endif::backend-xhtml11[]
246Misc:
247------------------------------------------------------------------------------
248none Do nothing
249prompt Bring up the prompt
250screen-redraw Redraw the screen
251screen-resize Resize the screen
252show-version Show version information
253stop-loading Stop all loading views
254toggle-lineno Toggle line numbers
255toggle-date Toggle date display
256toggle-author Toggle author display
257toggle-rev-graph Toggle revision graph visualization
258toggle-refs Toggle reference display
259status-update Update file status
260status-merge Resolve unmerged file
261tree-parent Switch to parent directory in tree view
262edit Open in editor
263------------------------------------------------------------------------------
264
265
266Color command
267-------------
268
269Color commands control highlighting and the user interface styles. If your
270terminal supports color, these commands can be used to assign foreground and
271background combinations to certain areas. Optionally, an attribute can be
272given as the last parameter. The syntax is:
273
274[verse]
275..............................................................................
276*color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
277..............................................................................
278
279Examples:
280
281------------------------------------------------------------------------------
282# Overwrite the default terminal colors to white on black.
283color default white black
284# Diff colors
285color diff-header yellow default
286color diff-index blue default
287color diff-chunk magenta default
288# A strange looking cursor line
289color cursor red default underline
290# UI colors
291color title-blur white blue
292color title-focus white blue bold
293------------------------------------------------------------------------------
294
295Area names::
296
297 Valid area names are described below. Note, all names are
298 case-insensitive, and you may use '-', '_', and '.' interchangeably,
299 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
300
301Color names::
302
303 Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
304 *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
305 default terminal colors.
306
307Attribute names::
308
309 Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
310 *standout*, and *underline*. Note, not all attributes may be supported
311 by the terminal.
312
313UI colors
314~~~~~~~~~
315
316--
317
318Default terminal colors::
319
320The colors and attributes to be used for the text that is not highlighted or
321that specify the use of the default terminal colors can be controlled by
322setting the *default* color option.
323
324Use the *default* color to use the colors configured for the terminal. This is
325the default and recommended if you are using a terminal with a transparent
326background.
327
328Status window colors::
329
330Appearance of the bottom window showing info messages.
331
332*status*
333
334Title window colors::
335
336Appearance of the title windows when they are attached
337to any backgrounded windows and the current window.
338
339*title-blur*, *title-focus*
340
341Cursor line colors::
342
343*cursor*
344
345Color of delimiter shown for truncated lines::
346
347*delimiter*
348
349Main view specific::
350
351Appearance of the various columns in the main view, including labels for tag
352and branch references.
353
354*main-date*, *main-author*, *main-commit*, *main-tag*, *main-local-tag*,
355*main-ref*, *main-remote*, *main-head*, *main-revgraph*
356
357Blame view colors::
358
359The colors used for the blame view are similar to those in the main view.
360The commit ID color can be colored using *blame-id*.
361
362*blame-date*, *blame-author*, *blame-commit*, *blame-id*, *blame-lineno*
363
364--
365
366Highlighting
367~~~~~~~~~~~~
368
369--
370
371Diff markup::
372
373Options concerning diff start, chunks and lines added and deleted.
374
375*diff-header*, *diff-chunk*, *diff-add*, *diff-del*
376
377Enhanced git diff markup::
378
379Extra diff information emitted by the git diff machinery, such as mode
380changes, rename detection, and similarity.
381
382*diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
383*diff-rename-from*, *diff-rename-to*, *diff-similarity*, *diff-dissimilarity*
384*diff-tree*, *diff-index*
385
386Pretty print commit headers::
387
388Commit diffs and the revision logs are usually formatted using pretty printed
389headers , unless `--pretty=raw` was given. This includes lines, such as merge
390info, commit ID, and author and committer date.
391
392*pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*,
393*pp-refs*
394
395Raw commit header::
396
397Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
398omnipresent.
399
400*commit*, *parent*, *tree*, *author*, *committer*
401
402Commit message::
403
404For now only `Signed-off-by` and `Acked-by` lines are colorized.
405
406*signoff*, *acked*
407
408Tree markup::
409
410Colors for information of the tree view.
411
412*tree-dir*, *tree-file*
413
414Status markup::
415
416Colors used in the status view for coloring the "On branch"-line, sections,
417"no file" lines and the various file status groups.
418
419*stat-head*, *stat-section*, *stat-none*, *stat-staged*, *stat-unstaged*,
420*stat-untracked*
421
422--
423
424COPYRIGHT
425---------
426Copyright (c) 2006-2007 Jonas Fonseca <fonseca@diku.dk>
427
428Licensed under the terms of the GNU General Public License.
429
430SEE ALSO
431--------
432gitlink:tig[1] and the http://jonas.nitro.dk/tig/manual.html[tig manual].